Skip to content

Instantly share code, notes, and snippets.

Avatar
💤

clementauger

💤
  • FRA
View GitHub Profile
@clementauger
clementauger / index.js
Created Oct 5, 2020
double ratchet javascript experimentation, adapted from https://github.com/HR/ciphora
View index.js
const crypto = require('crypto'),
hkdf = require('futoin-hkdf'),
// TODO: Replace with crypto.diffieHellman once nodejs#26626 lands on v12 LTS
{ box } = require('tweetnacl'),
boxutil = require('tweetnacl-util'),
{ chunk, hexToUint8 } = require('./utils'),
CIPHER = 'aes-256-cbc',
RATCHET_KEYS_LEN = 64,
RATCHET_KEYS_HASH = 'SHA-256',
You can’t perform that action at this time.