https://github.com/abeaumont/ocaml-salsa20-core
Salsa20 core functions, in OCaml
https://github.com/abeaumont/ocaml-salsa20-core
cryptography ocaml salsa20
Last synced: 2 months ago
JSON representation
Salsa20 core functions, in OCaml
- Host: GitHub
- URL: https://github.com/abeaumont/ocaml-salsa20-core
- Owner: abeaumont
- License: bsd-2-clause
- Created: 2017-03-04T18:05:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-07-14T18:39:55.000Z (11 months ago)
- Last Synced: 2024-07-15T19:35:38.991Z (11 months ago)
- Topics: cryptography, ocaml, salsa20
- Language: OCaml
- Homepage:
- Size: 633 KB
- Stars: 9
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://abeaumont.github.io/ocaml-salsa20-core)
# The Salsa20 core functions, in OCaml
An OCaml implementation of [Salsa20 Core](http://cr.yp.to/salsa20.html) functions, both Salsa20/20 Core and the reduced Salsa20/8 Core and Salsa20/12 Core functions.
The hot loop is implemented in C for efficiency reasons.Salsa 20 Core are functions from 64-byte strings to 64-byte strings.
## Installation
```
opam install salsa20-core
```## Usage
```ocaml
utop[0]> #require "salsa20-core";;
utop[1]> 0
|> Char.chr
|> String.make 64
|> Salsa20_core.salsa20_20_core (* or salsa20_12_core / salsa20_8_core *);;
- : string =
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
```