From a4ee98e0e1f7a8a30b066c97936b32e795d5733d Mon Sep 17 00:00:00 2001 From: Avi Date: Mon, 15 Aug 2022 09:33:51 -0400 Subject: [PATCH] Add aliases for edwards25519/field.feMul and field.feSquare ed25519vectors_test.go still fails because: * It relies on "go mod download" which doesn't work, as well as fork/exec. * It relies on JSON parsing which has problems with reflection. But, with the vectors hard coded in the test file the tests *do* succeed, so the encryption is working. --- compiler/alias.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/alias.go b/compiler/alias.go index 7ca7f57c..50e3f101 100644 --- a/compiler/alias.go +++ b/compiler/alias.go @@ -16,6 +16,8 @@ import "tinygo.org/x/go-llvm" var stdlibAliases = map[string]string{ // crypto packages + "crypto/ed25519/internal/edwards25519/field.feMul": "crypto/ed25519/internal/edwards25519/field.feMulGeneric", + "crypto/ed25519/internal/edwards25519/field.feSquare": "crypto/ed25519/internal/edwards25519/field.feSquareGeneric", "crypto/md5.block": "crypto/md5.blockGeneric", "crypto/sha1.block": "crypto/sha1.blockGeneric", "crypto/sha1.blockAMD64": "crypto/sha1.blockGeneric",