fix: strip key type prefix
This commit is contained in:
parent
258031cb8f
commit
280e5b1d71
|
@ -103,12 +103,11 @@ func (m *MediaMetadata) decodeProof(dec *msgpack.Decoder) error {
|
|||
return err
|
||||
}
|
||||
|
||||
for j := 0; j < len(proofData); j++ {
|
||||
var hashType int8
|
||||
var pubkey []byte
|
||||
var signature []byte
|
||||
|
||||
for j := 0; j < len(proofData); j++ {
|
||||
|
||||
switch j {
|
||||
case 0:
|
||||
sigType := proofData[j].(int8)
|
||||
|
@ -134,7 +133,7 @@ func (m *MediaMetadata) decodeProof(dec *msgpack.Decoder) error {
|
|||
case 3:
|
||||
signature = proofData[j].([]byte)
|
||||
|
||||
if valid := ed25519.Verify(pubkey, b3hash[:], signature); !valid {
|
||||
if valid := ed25519.Verify(pubkey[1:], b3hash[:], signature); !valid {
|
||||
return errors.New("Invalid signature")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue