PrivKeyEd25519 Generate function is broken
Closed this issue · 1 comments
xiaoxiaff commented
revision = "915416979bf70efa4bcbf1c6cd5d64c5fff9fc19"
version = "v0.6.2"
It seems that the current PrivKeyEd25519 Generate function is broken. The test code:
testPriv := crypto.GenPrivKeyEd25519()
testGenerate := testPriv.Generate(1)
fmt.Println(testPriv, testGenerate)
fmt.Println("check verification", testGenerate.PubKey().VerifyBytes(signBytes, testGenerate.Sign(signBytes)))
result:
[163 145 221 58 164 165 206 231 237 162 152 193 167 124 62 19 156 234 173 245 64 35 36 165 173 14 143 246 10 160 180 155 9 136 69 219 79 69 207 209 188 18 167 108 152 169 112 243 168 30 173 162 143 141 40 156 202 152 198 219 168 222 78 215] [173 90 206 81 228 116 143 58 212 62 156 192 248 100 141 85 72 187 218 126 66 205 195 140 220 55 77 65 105 224 174 67 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
check verification false
ebuchman commented
Thanks! Fixed on develop