nostril

A C cli tool for creating nostr events
git clone git://jb55.com/nostril
Log | Files | Refs | Submodules | README | LICENSE

hkdf_sha256.h (856B)


      1 #ifndef CCAN_CRYPTO_HKDF_SHA256_H
      2 #define CCAN_CRYPTO_HKDF_SHA256_H
      3 /* BSD-MIT - see LICENSE file for details */
      4 #include "config.h"
      5 #include "hmac_sha256.h"
      6 #include <stdlib.h>
      7 
      8 /**
      9  * hkdf_sha256 - generate a derived key
     10  * @okm: where to output the key
     11  * @okm_size: the number of bytes pointed to by @okm (must be less than 255*32)
     12  * @s: salt
     13  * @ssize: the number of bytes pointed to by @s
     14  * @k: pointer to input key
     15  * @ksize: the number of bytes pointed to by @k
     16  * @info: pointer to info
     17  * @isize: the number of bytes pointed to by @info
     18  */
     19 void hkdf_sha256(void *okm, size_t okm_size,
     20 		 const void *s, size_t ssize,
     21 		 const void *k, size_t ksize,
     22 		 const void *info, size_t isize);
     23 
     24 void hkdf_expand(void *okm, size_t okm_size,
     25 		 const void *prk, size_t prksize,
     26 		 const void *info, size_t isize);
     27 
     28 #endif /* CCAN_CRYPTO_HKDF_SHA256_H */