In the case we will compute the point multiplication for \([k].G\) for the Ristretto prime-order group built from Edwards25519, along with computing \([k^{-1}].G\).
Point multipliation with Ristretto prime-order group built from Edwards25519 |
Theory
In the case we will compute the point multiplication for \([k].G\) for the Ristretto prime-order group built from Edwards25519, along with computing \([k^{-1}].G\)
The coding is:
package main import ( "fmt" "math/big" "strconv" "github.com/bwesterb/go-ristretto" "os" ) func main() { ival:=1 argCount := len(os.Args[1:]) if argCount > 0 { ival,_ =strconv.Atoi( os.Args[1]) } i:=int64(ival) var s ristretto.Scalar s.SetBigInt(big.NewInt(i)) var p3,p4,B ristretto.Point B.SetBase() p3.ScalarMult(&B, &s) s.Inverse(&s) p4.ScalarMult(&B, &s) fmt.Printf("\nBase point (B)=\t%v\n",B) fmt.Printf("[%d].B=\t\t%v\n",i,p3) fmt.Printf("[Inv(%d)].B=\t%v\n",i,p4) }
and a sample run is:
Base point (B)= 4vKuCmq8TnGohKlhxQBRX1jjC2qlgt2NtqZZReCNLXY [3].B= lHQfXV1SdV7OTyPwRO4n1dHqHivRlrRiFmsWFSqdAlk [Inv(3)].B= 6PafLuh-98HlTs8MCIg-OUBsDT_AHtqUEWRShw4Objs
References
[1] Hamburg, M. (2015). Decaf: Eliminating cofactors through point compression. In Advances in Cryptology--CRYPTO 2015: 35th Annual Cryptology Conference, Santa Barbara, CA, USA, August 16-20, 2015, Proceedings, Part I 35 (pp. 705-723). Springer Berlin Heidelberg.
[2] de Valence, H., Grigg, J., Hamburg, M., Lovecruft, I., Tankersley, G., & Valsorda, F. (2023). RFC 9496: The ristretto255 and decaf448 Groups., https://dl.acm.org/doi/book/10.17487/RFC9496