Skip to content

Check the input of SecretKey.from_bytes to be non zero #39

Closed
ChihChengLiang/milagro_bls_binding
#21
@ChihChengLiang

Description

Hi @kirk-baird,

In the recent release, the standard disallows zero secret key. Should we also add a non-zero check in the SecretKey.from_bytes method? Or do we intentionally don't do so?

milagro_bls/src/keys.rs

Lines 73 to 77 in 515201c

pub fn from_bytes(input: &[u8]) -> Result<SecretKey, AmclError> {
Ok(Self {
x: secret_key_from_bytes(input)?,
})
}

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions