Skip to content

Commit

Permalink
Updating RFC9380 references.
Browse files Browse the repository at this point in the history
  • Loading branch information
armfazh committed Sep 29, 2023
1 parent 2c5d832 commit 9882252
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/groupSjcl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ interface InnerScalar {
}

interface SSWUParams {
// See Section F.2.1.2 at https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-14#appendix-F.2.1.2
// See Appendix F.2.1.2 of RFC-9380
// https://datatracker.ietf.org/doc/html/rfc9380#appendix-F.2.1.2
Z: sjcl.bn
c1: sjcl.bn // 1. c1 = (p-3)/4
c2: sjcl.bn // 2. c2 = sqrt(-Z) in GF(p).
Expand Down Expand Up @@ -395,8 +396,8 @@ class EltSj implements Elt {

private static sswu(g: GroupSj, u: sjcl.bn): EltSj {
// Simplified SWU method.
// Appendix F.2 of draft-irtf-cfrg-hash-to-curve-14
// https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-14#appendix-F.2
// Appendix F.2 of RFC-9380
// https://datatracker.ietf.org/doc/html/rfc9380#appendix-F.2
const curve = getCurve(g.id)
const { a: A, b: B } = curve
const { Z, c1, c2 } = getSSWUParams(g.id)
Expand Down

0 comments on commit 9882252

Please sign in to comment.