Skip to content

Commit edc77d1

Browse files
committed
Add K to GroupDigest
1 parent f0186fa commit edc77d1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

elliptic-curve/src/hash2curve/group_digest.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use super::{ExpandMsg, FromOkm, MapToCurve, hash_to_field};
44
use crate::{CurveArithmetic, ProjectivePoint, Result};
55
use group::cofactor::CofactorGroup;
6+
use hybrid_array::ArraySize;
67

78
/// Adds hashing arbitrary byte sequences to a valid group element
89
pub trait GroupDigest: CurveArithmetic
@@ -12,6 +13,11 @@ where
1213
/// The field element representation for a group value with multiple elements
1314
type FieldElement: FromOkm + MapToCurve<Output = ProjectivePoint<Self>> + Default + Copy;
1415

16+
/// The target security level in bits:
17+
/// <https://www.rfc-editor.org/rfc/rfc9380.html#section-8.9-2.2>
18+
/// <https://www.rfc-editor.org/rfc/rfc9380.html#name-target-security-levels>
19+
type K: ArraySize;
20+
1521
/// Computes the hash to curve routine.
1622
///
1723
/// From <https://www.ietf.org/archive/id/draft-irtf-cfrg-hash-to-curve-13.html>:

0 commit comments

Comments
 (0)