Crate hash2curve

Crate hash2curve 

Source
Expand description

This implements the hash to curve as described in https://datatracker.ietf.org/doc/draft-irtf-cfrg-hash-to-curve/?include_text=1

The idea is to offer concrete methods for hashing arbitrary input to a point on an elliptic curve used in cryptography.

As much as possible, the interfaces, structs, and traits have been modeled after the RustCrypto digest crate at https://docs.rs/digest/

These methods do not cover serialization or deserialization according to http://www.secg.org/sec1-v2.pdf

Structs§

ExpandMsgXmd
expand_msg traits and methods Placeholder type for implementing expand_message_xmd based on a hash function
ExpandMsgXof
expand_msg traits and methods Placeholder type for implementing expand_message_xof based on a hash function

Enums§

Error
The error types of this crate The kinds of errors

Traits§

BaseFromRO
From random oracle traits Generate an element of a base field from a random byte sequence (used by FromRO for extension fields)
EncodeToCurve
Injective oracle map to curve
ExpandMsg
expand_msg traits and methods Trait for types implementing expand_message interface for hash_to_field
FromRO
From random oracle traits Generate an element from a random byte sequence
HashToCurve
Random oracle map to curve

Functions§

hash_to_field
hash to field traits and methods Create count elements by hashing msg and dst
hash_to_field_in_place
hash to field traits and methods Create count elements by hashing msg and dst