Lines Matching refs:nonce
34 struct bch_csum bch2_checksum(struct bch_fs *, unsigned, struct nonce,
72 int bch2_chacha_encrypt_key(struct bch_key *, struct nonce, void *, size_t);
78 int bch2_encrypt(struct bch_fs *, unsigned, struct nonce,
82 struct nonce, struct bio *);
91 struct nonce, struct bio *);
94 struct nonce nonce, struct bio *bio) in bch2_encrypt_bio() argument
97 ? __bch2_encrypt_bio(c, type, nonce, bio) in bch2_encrypt_bio()
174 static inline struct nonce nonce_add(struct nonce nonce, unsigned offset) in nonce_add() argument
178 le32_add_cpu(&nonce.d[0], offset / CHACHA_BLOCK_SIZE); in nonce_add()
179 return nonce; in nonce_add()
182 static inline struct nonce null_nonce(void) in null_nonce()
184 struct nonce ret; in null_nonce()
190 static inline struct nonce extent_nonce(struct bversion version, in extent_nonce()
197 struct nonce nonce = (struct nonce) {{ in extent_nonce() local
205 return nonce_add(nonce, crc.nonce << 9); in extent_nonce()
213 static inline struct nonce __bch2_sb_key_nonce(struct bch_sb *sb) in __bch2_sb_key_nonce()
217 return (struct nonce) {{ in __bch2_sb_key_nonce()
225 static inline struct nonce bch2_sb_key_nonce(struct bch_fs *c) in bch2_sb_key_nonce()
229 return (struct nonce) {{ in bch2_sb_key_nonce()