Skip to content

Signature id validation #31

@coot

Description

@coot

The id is a Blake2b hash, ref:

pub async fn build(&self, message_bytes: &[u8]) -> StdResult<DmqMsg> {
        fn compute_msg_id(dmq_message: &DmqMsg) -> Vec<u8> {
            let mut hasher = Blake2b::<U64>::new();
            hasher.update(&dmq_message.msg_body);
            hasher.update(dmq_message.block_number.to_be_bytes());
            hasher.update(dmq_message.ttl.to_be_bytes());
            hasher.update(&dmq_message.kes_signature);
            hasher.update(&dmq_message.operational_certificate);
            hasher.update(dmq_message.kes_period.to_be_bytes());

            hasher.finalize().to_vec()
        }

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions