1 #ifndef LIGHTNING_COMMON_CRYPTO_STATE_H
2 #define LIGHTNING_COMMON_CRYPTO_STATE_H
3 #include "config.h"
4 #include <bitcoin/privkey.h>
5 
6 struct crypto_state {
7 	/* Received and sent nonces. */
8 	u64 rn, sn;
9 	/* Sending and receiving keys. */
10 	struct secret sk, rk;
11 	/* Chaining key for re-keying */
12 	struct secret s_ck, r_ck;
13 };
14 
15 void towire_crypto_state(u8 **pptr, const struct crypto_state *cs);
16 void fromwire_crypto_state(const u8 **ptr, size_t *max, struct crypto_state *cs);
17 
18 #endif /* LIGHTNING_COMMON_CRYPTO_STATE_H */
19