Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paulmillr/aesscr
Use AES-256-GCM + Scrypt to encrypt files.
https://github.com/paulmillr/aesscr
Last synced: 25 days ago
JSON representation
Use AES-256-GCM + Scrypt to encrypt files.
- Host: GitHub
- URL: https://github.com/paulmillr/aesscr
- Owner: paulmillr
- License: mit
- Created: 2022-06-21T12:09:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-24T07:55:25.000Z (over 2 years ago)
- Last Synced: 2024-10-28T23:41:22.443Z (2 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aesscr
Use AES-256-GCM + Scrypt to encrypt files.
## Usage
> npm install -g aesscr
CLI:
```sh
aesscr encrypt file.zip PASSWORD
# will create file.zip.aesscr
aesscr decrypt file.zip.aesscr PASSWORD
# will create file.zip# PASSWORD must be 14 or more characters
# PASSWORD can be also supplied in ENV variable:
export AES_PASSWORD='abcdefabcdef1234'
aesscr encrypt file.zip
```API:
```ts
import { encrypt, decrypt } from 'aesscr';
await encrypt("password101520", Uint8Array.from([5, 10, 11]));
```## Algorithm
- Encryption: AES-256-GCM
- Ciphertext format: `IV + ciphertext + GCM tag`
- KDF: Scrypt, N=2^19, r=8, p=1, dkLen=32, salt=`aes-1234-scr-5678-gcm`
- password is used in KDF is used to derive AES key## License
MIT License