pub fn encode_signature(pk: &PublicKey, sig: &Signature) -> Vec<Felt>Expand description
Encodes the provided Falcon public key and signature into a vector of field elements in the
format expected by miden::core::crypto::dsa::falcon512_poseidon2::verify procedure.
The encoding format is (in reverse order on the advice stack):
- The challenge point, a tuple of elements representing an element in the quadratic extension field, at which we evaluate the polynomials in the subsequent three points to check the product relationship.
- The expanded public key represented as the coefficients of a polynomial of degree < 512.
- The signature represented as the coefficients of a polynomial of degree < 512.
- The product of the above two polynomials in the ring of polynomials with coefficients in the Miden field.
- The nonce represented as 8 field elements.
The result can be streamed straight to the advice provider before invoking
falcon512_poseidon2::verify.