git ssb

1+

Dominic / ssb-keys



Commit ed6d6091d9231d06e6e284991dfae1950559d734

remove old ecc key deserialize

Henry committed on 10/2/2017, 12:34:50 AM
Parent: 8b52b7ecea8ab1b620f0792ae50a374a609b0434

Files changed

storage.jschanged
storage.jsView
@@ -58,20 +58,8 @@
5858 var keys = JSON.parse(privateKey)
5959 if(!u.hasSigil(keys.id)) keys.id = '@' + keys.public
6060 return keys
6161 } catch (_) { console.error(_.stack) }
62-
63- //else, reconstruct legacy curve...
64-
65- var curve = u.getTag(privateKey)
66-
67- if(curve !== 'k256')
68- throw new Error('expected legacy curve (k256) but found:' + curve)
69-
70- var fool_browserify = require
71- var ecc = fool_browserify('./eccjs')
72-
73- return u.keysToJSON(ecc.restore(u.toBuffer(privateKey)), 'k256')
7462 }
7563
7664 exports.load = function(filename, cb) {
7765 filename = toFile(filename, 'secret')

Built with git-ssb-web