diff --git a/main.go b/main.go index 5a97484..a921f85 100644 --- a/main.go +++ b/main.go @@ -2,6 +2,7 @@ package main import ( "github.com/acheong08/crystals-go/dilithium" + "github.com/acheong08/crystals-go/kyber" ) // Just testing a few things to make sure the code is working @@ -15,4 +16,15 @@ func main() { } else { println("success") } + k := kyber.NewKyber512() + pk, sk = k.KeyGen([]byte("test")) + msg = []byte("hello world") + c, ss := k.Encaps(pk, msg) + newss := k.Decaps(sk, c) + // Convert to string and compare + if string(ss) != string(newss) { + panic("failed") + } else { + println("success") + } }