[Ndn-lib] NDN-JS support for crypto.subtle

Wentao Shang wentaoshang at gmail.com
Mon Feb 2 15:23:54 PST 2015

Great work! This is very exciting. Any plan for adding encryption support?


On Mon Feb 02 2015 at 2:37:43 PM Thompson, Jeff <jefft0 at remap.ucla.edu>

>  Hello all,
>  NDN-JS now has preliminary support for crypto.subtle (the WebCrypto
> API). Crypto.subtle is an API so that JavaScript code in browsers can use
> fast native crypto. If NDN-JS detects that the browser has crypto.subtle,
> then it will use it. Otherwise it falls back to the (slow) pure JavaScript
> code. We have tested it in Chrome and Firefox. The speed up is substantial,
> increasing from 22 signatures per second to 1000 per second with
> crypto.subtle.
>  Currently there is support for signing and verifying. Crypto.subtle is
> asynchronous and returns its results in a callback. This was OK for verify
> because the NDN-JS call already uses callbacks for onVerified and
> onVerifyFailed. But for signing, we needed to add an optional callback to
> KeyChain.sign.  See the doc comment for the onComplete callback:
> https://github.com/named-data/ndn-js/blob/82eeee27eff7f94ab10af2112f65e54ce233e797/js/security/key-chain.js#L272
>  Many thanks to Ryan Bennett for submitting the code to support
> crypto.subtle.
>  - Jeff T
>  _______________________________________________
> Ndn-lib mailing list
> Ndn-lib at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-lib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-lib/attachments/20150202/43d199ef/attachment-0001.html>

More information about the Ndn-lib mailing list