Merge pull request #42 from sublimator/patch-1

ed25519: fix ristrettoHash size typo in hashToCurve
This commit is contained in:
Paul Miller 2023-05-05 17:48:08 +02:00 committed by GitHub
commit 5edafbac97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -352,11 +352,11 @@ export class RistrettoPoint {
} }
/** /**
* Takes uniform output of 64-bit hash function like sha512 and converts it to `RistrettoPoint`. * Takes uniform output of 64-byte hash function like sha512 and converts it to `RistrettoPoint`.
* The hash-to-group operation applies Elligator twice and adds the results. * The hash-to-group operation applies Elligator twice and adds the results.
* **Note:** this is one-way map, there is no conversion from point to hash. * **Note:** this is one-way map, there is no conversion from point to hash.
* https://ristretto.group/formulas/elligator.html * https://ristretto.group/formulas/elligator.html
* @param hex 64-bit output of a hash function * @param hex 64-byte output of a hash function
*/ */
static hashToCurve(hex: Hex): RistrettoPoint { static hashToCurve(hex: Hex): RistrettoPoint {
hex = ensureBytes('ristrettoHash', hex, 64); hex = ensureBytes('ristrettoHash', hex, 64);