Exemple #1
0
func SignEd25519SKToCurve25519(curve25519SK []byte, ed25519SK []byte) int {
	support.CheckSize(curve25519SK, scalarmult.ScalarMultBytes(), "curve25519 secret key output")
	support.CheckSize(ed25519SK, SignSecretKeyBytes(), "ed25519 secret key")

	return int(C.crypto_sign_ed25519_sk_to_curve25519(
		(*C.uchar)(&curve25519SK[0]), (*C.uchar)(&ed25519SK[0])))
}
Exemple #2
0
func SignEd25519PKToCurve25519(curve25519PK []byte, ed25519PK []byte) int {
	support.CheckSize(curve25519PK, scalarmult.ScalarMultBytes(), "curve25519 public key output")
	support.CheckSize(ed25519PK, SignPublicKeyBytes(), "ed25519 public key")

	return int(C.crypto_sign_ed25519_pk_to_curve25519(
		(*C.uchar)(&curve25519PK[0]), (*C.uchar)(&ed25519PK[0])))
}