Skip to content

Commit fae9707

Browse files
authored
lms-signature v0.0.1 (#815)
1 parent ed9be46 commit fae9707

File tree

4 files changed

+43
-20
lines changed

4 files changed

+43
-20
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lms/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
2+
23
All notable changes to this project will be documented in this file.
34

45
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
56
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## 0.0.1 (2024-04-16)
9+
10+
- Initial release

lms/Cargo.toml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "lms-signature"
3-
version = "0.0.0"
3+
description = "Pure Rust implementation of Leighton-Micali Hash-Based Signatures (RFC 8554)"
4+
version = "0.0.1"
45
edition = "2021"
56
license = "Apache-2.0 OR MIT"
67
repository = "https://github.com/RustCrypto/signatures/tree/master/lms"
@@ -9,16 +10,9 @@ rust-version = "1.73"
910
categories = ["cryptography"]
1011
keywords = ["crypto", "signature"]
1112

12-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
13-
14-
[lib]
15-
name = "lms"
16-
path = "src/lib.rs"
17-
edition = "2021"
18-
1913
[dependencies]
2014
digest = "0.10.7"
21-
generic-array = {version = "0.14.4", features = ["zeroize"]}
15+
generic-array = { version = "0.14.4", features = ["zeroize"] }
2216
rand = "0.8.5"
2317
sha2 = "0.10.8"
2418
static_assertions = "1.1.0"

lms/README.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
# Leighton-Micali Hash-Based Signatures
1+
# [RustCrypto]: Leighton-Micali Signatures
2+
3+
[![crate][crate-image]][crate-link]
4+
[![Docs][docs-image]][docs-link]
5+
[![Build Status][build-image]][build-link]
6+
![Apache2/MIT licensed][license-image]
7+
![MSRV][rustc-image]
8+
[![Project Chat][chat-image]][chat-link]
29

310
This repository contains implementations of [Leighton-Micali Hash-Based
411
Signatures (RFC 8554)](https://datatracker.ietf.org/doc/html/rfc8554).
@@ -17,10 +24,9 @@ persistent storage after each signature is generated and before it is released
1724
to the rest of the application. Failure to adhere to this requirement is a
1825
security vulnerability in your application.
1926

20-
For a stateless hash-based signature algorithm, see
21-
[SPHINCS+](https://sphincs.org).
27+
For a stateless hash-based signature algorithm, see [SLH-DSA].
2228

23-
NOTE: this project has not been externally audited, but the entire codebase
29+
NOTE: this project has not been externally audited, but the entire codebase
2430
was internally reviewed by cryptographers at Trail of Bits.
2531

2632
## Installation
@@ -35,10 +41,10 @@ Our implementation uses strongly typed private and public key types.
3541

3642
```rust
3743
let mut rng = thread_rng();
38-
let mut seckey = lms::lms::PrivateKey::new::<LmsSha256M32H10<LmsOtsSha256N32W4>>(&mut rng);
44+
let mut seckey = lms::lms::PrivateKey::new::<LmsSha256M32H10<LmsOtsSha256N32W4> > ( & mut rng);
3945
let pubkey = seckey.public(); // of type lms::lms::PublicKey<LmsSha256M32H10>
40-
let sig = seckey.try_sign_with_rng(&mut rng, "example".as_bytes()).unwrap();
41-
let sig_valid = pubkey.verify("example".as_bytes(), &sig).is_ok();
46+
let sig = seckey.try_sign_with_rng( & mut rng, "example".as_bytes()).unwrap();
47+
let sig_valid = pubkey.verify("example".as_bytes(), & sig).is_ok();
4248
```
4349

4450
We can generate LMOTS signatures in the same way using `lms::ots::PrivateKey`
@@ -58,13 +64,31 @@ good**.
5864

5965
All crates licensed under either of
6066

61-
* [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
62-
* [MIT license](http://opensource.org/licenses/MIT)
67+
* [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
68+
* [MIT license](http://opensource.org/licenses/MIT)
6369

6470
at your option.
6571

6672
## Contribution
6773

6874
Unless you explicitly state otherwise, any contribution intentionally submitted
6975
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
70-
dual licensed as above, without any additional terms or conditions.
76+
dual licensed as above, without any additional terms or conditions.
77+
78+
[//]: # (badges)
79+
80+
[crate-image]: https://buildstats.info/crate/lms-signature
81+
[crate-link]: https://crates.io/crates/lms-signature
82+
[docs-image]: https://docs.rs/lms-signature/badge.svg
83+
[docs-link]: https://docs.rs/lms-signature/
84+
[build-image]: https://github.com/RustCrypto/signatures/actions/workflows/lms.yml/badge.svg
85+
[build-link]: https://github.com/RustCrypto/signatures/actions/workflows/lms.yml
86+
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
87+
[rustc-image]: https://img.shields.io/badge/rustc-1.73+-blue.svg
88+
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
89+
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260048-signatures
90+
91+
[//]: # (links)
92+
93+
[RustCrypto]: https://github.com/RustCrypto
94+
[SLH-DSA]: https://github.com/RustCrypto/signatures/tree/master/slh-dsa

0 commit comments

Comments
 (0)