edwards25519 icon indicating copy to clipboard operation
edwards25519 copied to clipboard

How to regenerate scalar_fiat.go?

Open jas4711 opened this issue 1 year ago • 1 comments

Hi. The file claims to be auto-generated:

// Autogenerated: word_by_word_montgomery --lang Go --cmovznz-by-mul --relax-primitive-carry-to-bitwidth 32,64 --public-function-case camelCase --public-type-case camelCase --private-function-case camelCase --private-type-case camelCase --doc-text-before-function-name '' --doc-newline-before-package-declaration --doc-prepend-header 'Code generated by Fiat Cryptography. DO NOT EDIT.' --package-name edwards25519 Scalar 64 '2^252 + 27742317777372353535851937790883648493' mul add sub opp nonzero from_montgomery to_montgomery to_bytes from_bytes

I cannot find any instructions where to find this tool, or which version was used, or how to use it. Help?

Forwarded from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1085809 and https://lists.debian.org/debian-go/2024/05/msg00017.html

jas4711 avatar Nov 06 '24 13:11 jas4711

I'm a little surprised I didn't check in the Dockerfile, but the tool and version are here

https://github.com/FiloSottile/edwards25519/blob/a7dfd8e4e6b456f2f0d11f0176885421029b6e3f/scalar.go#L28-L54

FiloSottile avatar Nov 06 '24 13:11 FiloSottile