Tink for JavaScript

575 views
Skip to first unread message

Aviva Mael

unread,
Sep 14, 2020, 4:28:43 PM9/14/20
to tink-users
Hi all,

I would like to use Tink in JavaScript (to be used with GooglePay). Does anyone know when that would be available? In the Tink repo it says that it is in active development. Any information would be appreciated.

Many thanks,
Aviva

Thai Duong

unread,
Sep 14, 2020, 4:33:54 PM9/14/20
to Aviva Mael, Taymon Beal, tink-users
On Mon, Sep 14, 2020 at 1:28 PM 'Aviva Mael' via tink-users <tink-...@googlegroups.com> wrote:
Hi all,

I would like to use Tink in JavaScript (to be used with GooglePay). Does anyone know when that would be available? In the Tink repo it says that it is in active development. Any information would be appreciated.

We published an alpha package a while ago: https://www.npmjs.com/package/tink-crypto (sample usage). Note that this depends on WebCrypto. If you want to run it on Node.js, you'll have to install a WebCrypto shim.
 

Many thanks,
Aviva

--
You received this message because you are subscribed to the Google Groups "tink-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tink-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tink-users/eecda4ee-a1ec-4314-9ae9-31f6ff2f48bfn%40googlegroups.com.

scott krause

unread,
Sep 14, 2020, 4:50:16 PM9/14/20
to Thai Duong, Aviva Mael, Taymon Beal, tink-users
I wonder if the Golang implementation would run in the browser via WASM. I would be interested to know if anyone has tried this yet.



--
Best regards,
Scott C. Krause,


Taymon Beal

unread,
Sep 14, 2020, 11:18:25 PM9/14/20
to scott krause, Thai Duong, Aviva Mael, tink-users
You could maybe make that work, but the binary size will be huge. On my machine a basic "hello world" program using Tink for Go compiled to WebAssembly weighs in at 6.1 megabytes. If you value your users, don't send them that.

Also, I think it's using the pure-Go implementation of the crypto primitives, which is going to be both slower and more vulnerable to timing attacks than one implemented in assembly.

Taymon
Reply all
Reply to author
Forward
0 new messages