@waku/message-encryption
TypeScript icon, indicating that this package has built-in type declarations

0.0.34 • Public • Published

@waku/message-encryption

Provide Waku Message Version 1 payload encryption as defined in 26/WAKU2-PAYLOAD.

Symmetric Encryption

Symmetric encryption uses a unique key to encrypt and decrypt messages.

import {
  createDecoder,
  createEncoder,
  generateSymmetricKey
} from "@waku/message-encryption/symmetric";

// Generate a random key
const key = generateSymmetricKey();

// To send messages, create an encoder
const encoder = createEncoder(contentTopic, key);

// For example
waku.lightPush.push(encoder, { payload });

// To receive messages, create a decoder
const decoder = createDecoder(contentTopic, key);

// For example
await waku.store.queryOrderedCallback([decoder], (msg) => {
  // ...
});

ECIES Encryption

ECIES encryption enables encryption for a public key and decryption using a private key.

import {
  createDecoder,
  createEncoder,
  generatePrivateKey,
  getPublicKey
} from "@waku/message-encryption/ecies";

// Generate a random private key
const privateKey = generatePrivateKey();

// Keep the private key secure, provide the public key to the sender
const publicKey = getPublicKey(privateKey);

// To send messages, create an encoder
const encoder = createEncoder(contentTopic, publicKey);

// For example
waku.lightPush.push(encoder, { payload });

// To receive messages, create a decoder
const decoder = createDecoder(contentTopic, privateKey);

// For example
await waku.store.queryOrderedCallback([decoder], (msg) => {
  // ...
});

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.35-7a9850d.044next
0.0.3426latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.35-7a9850d.044
0.0.35-c7fe44e.052
0.0.34-0cec760.017
0.0.34-ef2a162.013
0.0.34-b133417.011
0.0.3426
0.0.34-4c18ca2.09
0.0.34-34d4730.09
0.0.34-b0a2e39.08
0.0.34-f7c290d.08
0.0.34-c8b7131.08
0.0.34-edb12b1.08
0.0.34-86bbf5b.08
0.0.34-0877e51.06
0.0.34-2ce706d.06
0.0.34-acc9100.05
0.0.34-b4748fd.05
0.0.34-ace7ca2.06
0.0.34-8c47a91.05
0.0.34-27c1236.06
0.0.34-b58de3a.05
0.0.34-01af155.06
0.0.34-c7a2055.06
0.0.34-d3a80d8.05
0.0.34-a8ca168.02
0.0.34-f7778a9.02
0.0.34-76fb1ea.02
0.0.34-3730abc.02
0.0.34-4997440.03
0.0.34-383e0b2.02
0.0.34-16328a3.01
0.0.34-7fba26d.00
0.0.34-10590da.00
0.0.34-f911bf8.00
0.0.34-b53ba62.00
0.0.34-6d86b6f.00
0.0.34-a7f52e4.00
0.0.34-006cd41.00
0.0.34-b7e9b08.00
0.0.332
0.0.33-3038c48.00
0.0.33-a824fff.01
0.0.33-1e590d7.00
0.0.33-d0da8f8.01
0.0.33-197ba46.00
0.0.33-d17562d.01
0.0.33-e31c6fc.01
0.0.33-164df63.00
0.0.33-35b50c3.01
0.0.33-fdaf129.01
0.0.33-731214b.01
0.0.33-db38a7e.01
0.0.33-bc093d3.01
0.0.33-ec5db88.00
0.0.33-f6b9809.01
0.0.33-1d384f2.00
0.0.33-aaa7a0c.00
0.0.33-4adf870.01
0.0.33-053bb95.01
0.0.33-9901863.01
0.0.33-a8ff776.00
0.0.33-6997987.00
0.0.33-ad0e277.01
0.0.33-f39d215.01
0.0.33-ff0222a.01
0.0.33-861a776.00
0.0.33-cad3e7a.02
0.0.32-0e49a1e.01
0.0.33-6198efb.01
0.0.33-5e19700.00
0.0.33-ea6daae.01
0.0.33-76f86de.00
0.0.321
0.0.32-29a4c3f.00
0.0.32-83cb8f4.00
0.0.32-2a94244.01
0.0.32-d27db21.00
0.0.32-5c50ed7.01
0.0.32-6661e30.00
0.0.32-6cb9c9c.01
0.0.32-9094860.01
0.0.32-a3e7f15.01
0.0.32-219b8cb.01
0.0.32-2380dac.00
0.0.32-00f2e75.01
0.0.32-950aefb.01
0.0.32-3ab8023.01
0.0.32-c8128d1.00
0.0.32-3670e82.01
0.0.32-a6c9380.01
0.0.32-2eccb11.02
0.0.32-b4f5423.01
0.0.32-8a6571f.01
0.0.32-caeafce.01
0.0.32-e3aa837.01
0.0.32-ebd7523.00
0.0.32-09108d9.00
0.0.32-c86e056.02
0.0.32-ce9a6ae.01
0.0.32-c41b319.00
0.0.32-c43cec2.01
0.0.32-1c0c5ee.00
0.0.32-5674b0e.00
0.0.32-9f1d8ca.01
0.0.32-66cf711.00
0.0.32-b6339f7.01
0.0.312
0.0.31-649943b.01
0.0.31-426bfa4.01
0.0.31-98208d5.01
0.0.31-11bf1c1.00
0.0.31-de10ff4.00
0.0.31-b7bdb60.00
0.0.31-e84eb62.00
0.0.31-535a20f.01
0.0.31-c9fdfb3.02
0.0.31-252ec59.01
0.0.31-a89e69f.01
0.0.31-09028e7.00
0.0.31-b93134a.01
0.0.31-00c3261.01
0.0.31-d3301ff.01
0.0.31-338250a.01
0.0.31-f599932.00
0.0.31-c50088a.01
0.0.31-aeb05cd.01
0.0.31-acef1ac.01
0.0.31-45523ca.01
0.0.31-6a2d787.01
0.0.31-2fe9875.01
0.0.301
0.0.30-5459f48.01
0.0.30-3687d81.01
0.0.29-f387f59.01
0.0.291
0.0.29-514ce36.00
0.0.29-39f8920.01
0.0.29-c33844e.01
0.0.29-77b2cdd.00
0.0.29-409642d.01
0.0.29-15400a5.01
0.0.29-88a29c3.00
0.0.29-08fc2d1.00
0.0.29-1887f4f.00
0.0.29-04bd518.00
0.0.29-ce62600.02
0.0.281
0.0.28-4db508b.01
0.0.28-42126a6.00
0.0.28-16e9116.00
0.0.28-d8ed83f.00
0.0.28-ab6f7ef.01
0.0.28-00c77c6.00
0.0.28-e49e728.01
0.0.27-3ec2344.00
0.0.28-682cc66.01
0.0.2724
0.0.27-5b03709.01
0.0.27-73d4f19.01
0.0.27-ea43068.00
0.0.27-fd60cc2.00
0.0.27-a7bf4fd.00
0.0.27-e5e8cd5.00
0.0.260
0.0.26-070b625.00
0.0.26-17a8640.01
0.0.26-9bf5716.01
0.0.26-efe9b8d.00
0.0.26-b5e8b17.01
0.0.26-434be7b.01
0.0.250
0.0.2426
0.0.24-7eb3375.01
0.0.24-678635e.00
0.0.24-4c5a8a9.02
0.0.236
0.0.24-34a25c2.01
0.0.23-a42b7be.01
0.0.220
0.0.211
0.0.200
0.0.190
0.0.180
0.0.170
0.0.162
0.0.151
0.0.142
0.0.130
0.0.120
0.0.110
0.0.100
0.0.90
0.0.80
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i @waku/message-encryption

Weekly Downloads

452

Version

0.0.34

License

MIT OR Apache-2.0

Unpacked Size

454 kB

Total Files

53

Last publish

Collaborators

  • royerfranck
  • richard-ramos
  • weboko
  • seemenkina