Skip to content

Commit

Permalink
Custom suite ids flag
Browse files Browse the repository at this point in the history
  • Loading branch information
davxy committed Apr 15, 2024
1 parent 55a174b commit 548ebaf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ pub enum Error {
VerificationFailure,
}

/// Flag to identify custom suites (i.e. not specified by RFC-9381).
pub const CUSTOM_SUITE_ID_FLAG: u8 = 0x80;

/// Defines a cipher suite.
///
/// This trait can be used to implement a VRF which follows the guidelines
Expand Down
2 changes: 1 addition & 1 deletion src/suites/bandersnatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub struct BandersnatchSha512;
suite_types!(BandersnatchSha512);

impl Suite for BandersnatchSha512 {
const SUITE_ID: u8 = 0x33;
const SUITE_ID: u8 = CUSTOM_SUITE_ID_FLAG | 0x03;
const CHALLENGE_LEN: usize = 32;

type Affine = ark_ed_on_bls12_381_bandersnatch::SWAffine;
Expand Down

0 comments on commit 548ebaf

Please sign in to comment.