Last active
October 7, 2015 12:24
-
-
Save dchest/0ac4e5ec809c74ecf4ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/hex" | |
"fmt" | |
"golang.org/x/crypto/curve25519" | |
) | |
func main() { | |
a, _ := hex.DecodeString("0300000000000000000000000000000000000000000000000000000000000000") | |
b, _ := hex.DecodeString("0900000000000000000000000000000000000000000000000000000000000000") | |
var ax, bx, dx [32]byte | |
copy(ax[:], a) | |
copy(bx[:], b) | |
curve25519.ScalarMult(&dx, &ax, &bx) | |
fmt.Printf("%x\n", dx) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Result: