ssbc / ssb-bfe

Binary Field Encodings (BFE) for Secure Scuttlebutt (SSB)
3 stars 1 forks source link

Envelope spec compat #11

Closed arj03 closed 3 years ago

arj03 commented 3 years ago

Envelope expects a 34 bytes message always when deriving, so in order to accommodate that this adds a helper function.

staltz commented 3 years ago

@arj03 Thanks for the ping. I took a careful look at this and envelope-js, and this function smells like it belongs to envelope-js. Would it be easy to move it over there? If you want to use the all caps constants, we actually also need to create a bfe.json similar to https://github.com/ssbc/envelope-spec/blob/master/encoding/tfk.json , because envelope-js uses that https://github.com/ssbc/envelope-js/blob/2d2bd576466850310a5261b8d7cc8591935ad961/util/cipherlink.js#L2

arj03 commented 3 years ago

Yes, need to create that bfe.json. Good input that this module should not know about what envelope is.