Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Oct 19, 2023
1 parent b7c4f17 commit eb3752f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ Check out [AES internals and block modes](#aes-internals-and-block-modes).
### Webcrypto AES

```js
// Wrapper over built-in webcrypto. Same API, but async
import { gcm, ctr, cbc } from '@noble/ciphers/webcrypto/aes';
for (let cipher of [gcm, siv, ctr, cbc]) {
const stream = cipher(key, nonce);
Expand All @@ -248,21 +247,24 @@ for (let cipher of [gcm, siv, ctr, cbc]) {
}
```

We also have separate wrapper over asynchronous WebCrypto built-in.
We also have a separate wrapper over WebCrypto built-in.

It's the same as using `crypto.subtle`, but with massively simplified API.

Unlike pure js version, it's asynchronous.

### Poly1305, GHash, Polyval

```js
import { poly1305 } from '@noble/ciphers/_poly1305';
import { ghash, polyval } from '@noble/ciphers/_polyval';
```

We expose polynomial-evaluation MACs: Poly1305, AES-GCM's GHash and AES-SIV's Polyval.
We expose polynomial-evaluation MACs: [Poly1305](https://cr.yp.to/mac.html),
AES-GCM's [GHash](https://en.wikipedia.org/wiki/Galois/Counter_Mode) and
AES-SIV's [Polyval](https://en.wikipedia.org/wiki/AES-GCM-SIV).

Poly1305 ([website](https://cr.yp.to/mac.html),
[PDF](https://cr.yp.to/mac/poly1305-20050329.pdf),
Poly1305 ([PDF](https://cr.yp.to/mac/poly1305-20050329.pdf),
[wiki](https://en.wikipedia.org/wiki/Poly1305))
is a fast and parallel secret-key message-authentication code suitable for
a wide variety of applications. It was standardized in
Expand Down

0 comments on commit eb3752f

Please sign in to comment.