https://github.com/codahale/lockstitch-go
https://github.com/codahale/lockstitch-go
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codahale/lockstitch-go
- Owner: codahale
- License: apache-2.0
- Created: 2025-03-02T03:47:57.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-01-12T01:57:36.000Z (2 months ago)
- Last Synced: 2026-01-12T06:03:19.840Z (2 months ago)
- Language: Go
- Homepage:
- Size: 283 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# Lockstitch
Lockstitch is an incremental, stateful cryptographic primitive for symmetric-key cryptographic operations (e.g.,
hashing, encryption, message authentication codes, and authenticated encryption) in complex protocols. Inspired by
TupleHash, STROBE, Noise Protocol's stateful objects, Merlin transcripts, and Xoodyak's Cyclist mode, Lockstitch
uses [SHA-256], [AES-128], and [GMAC] to provide 10+ Gb/sec performance on modern processors at a 128-bit security
level.
[SHA-256]: https://doi.org/10.6028/NIST.FIPS.180-4
[AES-128]: https://doi.org/10.6028/NIST.FIPS.197-upd1
[GMAC]: https://doi.org/10.6028/NIST.SP.800-38D
## CAUTION
⚠️ You should not use this. ⚠️
Neither the design nor the implementation of this library have been independently evaluated. The design is documented
in [`design.md`](design.md); read it and see if the arguments therein are convincing.
In addition, there is absolutely no guarantee of backwards compatibility.
## Design
A Lockstitch protocol is a stateful object that has five different operations:
* `Init`: Initializes a protocol with a domain separation string.
* `Mix`: Mixes a piece of data into the protocol's state, making all future outputs dependent on it.
* `Derive`: Outputs bytes of pseudo-random data dependent on the protocol's state.
* `Encrypt`/`Decrypt`: Encrypts and decrypts data using the protocol's state as the key.
* `Seal`/`Open`: Encrypts and decrypts data with authentication using the protocol's state as the
key.
Using these operations, one can construct a wide variety of symmetric-key constructions.
## Additional Information
For more information on the usage of Lockstitch, see the godoc.
For more information on the design of Lockstitch, see [`design.md`](design.md).
## License
Copyright © 2026 Coda Hale
Distributed under the Apache License 2.0 or MIT License.