Symmetric Functions

int wally_symmetric_key_from_seed(const unsigned char *bytes, size_t bytes_len, unsigned char *bytes_out, size_t len)

Create a new symmetric parent key from entropy.

Parameters:
  • bytes – Entropy to use.
  • bytes_len – Size of bytes in bytes. Must be one of BIP32_ENTROPY_LEN_128, BIP32_ENTROPY_LEN_256 or BIP32_ENTROPY_LEN_512.
  • bytes_out – Destination for the resulting parent key.
  • len – Size of bytes_out in bytes. Must be HMAC_SHA512_LEN.
Returns:

See Error Codes

int wally_symmetric_key_from_parent(const unsigned char *bytes, size_t bytes_len, uint32_t version, const unsigned char *label, size_t label_len, unsigned char *bytes_out, size_t len)

Create a new child symmetric key from a parent key.

Parameters:
  • bytes – Parent key to use.
  • bytes_len – Size of bytes in bytes. Must be HMAC_SHA512_LEN.
  • version – Version byte to prepend to label. Must be zero.
  • label – Label to use for the child.
  • label_len – Size of label in bytes.
  • bytes_out – Destination for the resulting key.
  • len – Size of bytes_out in bytes. Must be HMAC_SHA512_LEN.
Returns:

See Error Codes