Curve25519 digital signature
Hello,
I have an iOS app that uses CryptoKit's Curve25519 digital signature technology, but I can't successfully verify the signature on the server side, is the key common or is it only available on iOS?
I want to verify the user's identity by digital signature.
1.The client generates the key and signs the data.
2.The client side signs the data.
3.The client sends the data, signature and public key to the server.
4.The server fails to validate the signature.
Steps:
1.let digest = SHA512.hash(data: data)
2.let sk = Curve25519.Signing.PrivateKey()
3.let sig = try? sk.signature(for: Data(digest))
4.let pk = sk.publicKey.rawRepresentation
5.pk.isValidSignature(sig,for:Data(digest)), result true.
6.Send pk, sig and data to server .
7.Server(Java) cannot verify success.
Thanks
iPhone 13 Pro Max, iOS 16