我遇到了 Gocrypto/ed25519
软件包的问题。我正在尝试验证消息的签名,但我必须验证的签名和公钥比crypto/ed25519
支持的要长。
在crypto/ed25519
包中,支持的密钥和签名的长度有限制:
const (
// PublicKeySize is the size, in bytes, of public keys as used in this package.
PublicKeySize = 32
// PrivateKeySize is the size, in bytes, of private keys as used in this package.
PrivateKeySize = 64
// SignatureSize is the size, in bytes, of signatures generated and verified by this package.
SignatureSize = 64
// SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032.
SeedSize = 32
)
但是我必须用来验证消息的密钥比这长:
SignatureSize = 128
PublicKeySize = 64
当我尝试使用Verify(...)
它返回的函数时,false
由于我的签名和公钥大小的大小。我该怎么做才能以当前长度验证我的签名?