ExEcc.BLS.Hash (ExEcc v0.1.0)

View Source

Summary

Functions

HKDF-Expand (using SHA-256, digest size 32 bytes)

HKDF-Extract (using SHA-256)

Convert a nonnegative integer x to an octet string of a specified length xlen. Big-endian byte order. https://tools.ietf.org/html/rfc8017#section-4.1

Convert an octet string x to a nonnegative integer. Big-endian byte order. https://tools.ietf.org/html/rfc8017#section-4.2

SHA-256 hash of a binary string.

expand_message_xmd from RFC for hashing to curves. Uses SHA-256 as the hash function. https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-11#section-5.3.1

XOR two binary strings. They must be of the same length.

Functions

expand_message_xmd(msg, dst, len_in_bytes, hash_function)

hkdf_expand(prk, info, length)

HKDF-Expand (using SHA-256, digest size 32 bytes)

https://tools.ietf.org/html/rfc5869

hkdf_extract(salt, ikm)

HKDF-Extract (using SHA-256)

https://tools.ietf.org/html/rfc5869

i2osp(x, xlen)

Convert a nonnegative integer x to an octet string of a specified length xlen. Big-endian byte order. https://tools.ietf.org/html/rfc8017#section-4.1

os2ip(x)

Convert an octet string x to a nonnegative integer. Big-endian byte order. https://tools.ietf.org/html/rfc8017#section-4.2

sha256(x)

SHA-256 hash of a binary string.

sha256_function()

expand_message_xmd from RFC for hashing to curves. Uses SHA-256 as the hash function. https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-11#section-5.3.1

xor(a, b)

XOR two binary strings. They must be of the same length.