mirror of
https://github.com/RustCrypto/hashes.git
synced 2026-01-25 04:18:20 +00:00
Some checks failed
ascon-hash / set-msrv (push) Has been cancelled
ascon-hash / minimal-versions (push) Has been cancelled
belt-hash / set-msrv (push) Has been cancelled
belt-hash / minimal-versions (push) Has been cancelled
blake2 / set-msrv (push) Has been cancelled
blake2 / minimal-versions (push) Has been cancelled
fsb / set-msrv (push) Has been cancelled
fsb / minimal-versions (push) Has been cancelled
gost94 / set-msrv (push) Has been cancelled
gost94 / minimal-versions (push) Has been cancelled
groestl / set-msrv (push) Has been cancelled
groestl / minimal-versions (push) Has been cancelled
jh / set-msrv (push) Has been cancelled
jh / minimal-versions (push) Has been cancelled
k12 / set-msrv (push) Has been cancelled
k12 / minimal-versions (push) Has been cancelled
md2 / set-msrv (push) Has been cancelled
md2 / minimal-versions (push) Has been cancelled
md4 / set-msrv (push) Has been cancelled
md4 / minimal-versions (push) Has been cancelled
md5 / set-msrv (push) Has been cancelled
md5 / minimal-versions (push) Has been cancelled
ripemd / set-msrv (push) Has been cancelled
ripemd / minimal-versions (push) Has been cancelled
Security Audit / Security Audit (push) Has been cancelled
sha1-checked / set-msrv (push) Has been cancelled
sha1-checked / minimal-versions (push) Has been cancelled
sha1 / set-msrv (push) Has been cancelled
sha1 / minimal-versions (push) Has been cancelled
sha2 / set-msrv (push) Has been cancelled
sha2 / riscv64-zknh (push) Has been cancelled
sha2 / riscv32-zknh (push) Has been cancelled
sha2 / minimal-versions (push) Has been cancelled
sha3 / set-msrv (push) Has been cancelled
sha3 / minimal-versions (push) Has been cancelled
shabal / set-msrv (push) Has been cancelled
shabal / minimal-versions (push) Has been cancelled
skein / set-msrv (push) Has been cancelled
skein / minimal-versions (push) Has been cancelled
sm3 / set-msrv (push) Has been cancelled
sm3 / minimal-versions (push) Has been cancelled
streebog / set-msrv (push) Has been cancelled
streebog / minimal-versions (push) Has been cancelled
tiger / set-msrv (push) Has been cancelled
tiger / minimal-versions (push) Has been cancelled
whirlpool / set-msrv (push) Has been cancelled
whirlpool / minimal-versions (push) Has been cancelled
Workspace / clippy (push) Has been cancelled
Workspace / rustfmt (push) Has been cancelled
Workspace / typos (push) Has been cancelled
ascon-hash / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
ascon-hash / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
ascon-hash / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
ascon-hash / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
ascon-hash / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
ascon-hash / test (stable) (push) Has been cancelled
belt-hash / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
belt-hash / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
belt-hash / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
belt-hash / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
belt-hash / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
belt-hash / test (stable) (push) Has been cancelled
blake2 / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
blake2 / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
blake2 / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
blake2 / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
blake2 / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
blake2 / test (stable) (push) Has been cancelled
blake2 / cross (default, ${{needs.set-msrv.outputs.msrv}}, aarch64-unknown-linux-gnu) (push) Has been cancelled
blake2 / cross (default, ${{needs.set-msrv.outputs.msrv}}, powerpc-unknown-linux-gnu) (push) Has been cancelled
blake2 / cross (default, stable, aarch64-unknown-linux-gnu) (push) Has been cancelled
blake2 / cross (default, stable, powerpc-unknown-linux-gnu) (push) Has been cancelled
fsb / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
fsb / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
fsb / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
fsb / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
fsb / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
fsb / test (stable) (push) Has been cancelled
gost94 / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
gost94 / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
gost94 / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
gost94 / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
gost94 / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
gost94 / test (stable) (push) Has been cancelled
groestl / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
groestl / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
groestl / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
groestl / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
groestl / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
groestl / test (stable) (push) Has been cancelled
jh / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
jh / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
jh / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
jh / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
jh / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
jh / test (stable) (push) Has been cancelled
k12 / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
k12 / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
k12 / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
k12 / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
k12 / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
k12 / test (stable) (push) Has been cancelled
md2 / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
md2 / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
md2 / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
md2 / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
md2 / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
md2 / test (stable) (push) Has been cancelled
md4 / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
md4 / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
md4 / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
md4 / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
md4 / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
md4 / test (stable) (push) Has been cancelled
md5 / build (${{needs.set-msrv.outputs.msrv}}, loongarch64-unknown-linux-gnu) (push) Has been cancelled
md5 / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
md5 / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
md5 / build (stable, loongarch64-unknown-linux-gnu) (push) Has been cancelled
md5 / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
md5 / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
md5 / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
md5 / test (stable) (push) Has been cancelled
ripemd / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
ripemd / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
ripemd / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
ripemd / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
ripemd / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
ripemd / test (stable) (push) Has been cancelled
sha1-checked / build (${{needs.set-msrv.outputs.msrv}}, loongarch64-unknown-linux-gnu) (push) Has been cancelled
sha1-checked / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
sha1-checked / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
sha1-checked / build (stable, loongarch64-unknown-linux-gnu) (push) Has been cancelled
sha1-checked / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
sha1-checked / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
sha1-checked / linux (${{needs.set-msrv.outputs.msrv}}, x86_64-unknown-linux-gnu) (push) Has been cancelled
sha1-checked / linux (stable, x86_64-unknown-linux-gnu) (push) Has been cancelled
sha1-checked / macos (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
sha1-checked / macos (stable) (push) Has been cancelled
sha1-checked / windows (x86_64-pc-windows-gnu, ${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
sha1-checked / windows (x86_64-pc-windows-gnu, stable) (push) Has been cancelled
sha1-checked / cross (default, ${{needs.set-msrv.outputs.msrv}}, aarch64-unknown-linux-gnu) (push) Has been cancelled
sha1-checked / cross (default, ${{needs.set-msrv.outputs.msrv}}, powerpc-unknown-linux-gnu) (push) Has been cancelled
sha1-checked / cross (default, stable, aarch64-unknown-linux-gnu) (push) Has been cancelled
sha1-checked / cross (default, stable, powerpc-unknown-linux-gnu) (push) Has been cancelled
sha1 / build (${{needs.set-msrv.outputs.msrv}}, loongarch64-unknown-linux-gnu) (push) Has been cancelled
sha1 / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
sha1 / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
sha1 / build (stable, loongarch64-unknown-linux-gnu) (push) Has been cancelled
sha1 / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
sha1 / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
sha1 / linux (${{needs.set-msrv.outputs.msrv}}, x86_64-unknown-linux-gnu) (push) Has been cancelled
sha1 / linux (stable, x86_64-unknown-linux-gnu) (push) Has been cancelled
sha1 / macos (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
sha1 / macos (stable) (push) Has been cancelled
sha1 / windows (x86_64-pc-windows-gnu, ${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
sha1 / windows (x86_64-pc-windows-gnu, stable) (push) Has been cancelled
sha1 / cross (default, ${{needs.set-msrv.outputs.msrv}}, aarch64-unknown-linux-gnu) (push) Has been cancelled
sha1 / cross (default, ${{needs.set-msrv.outputs.msrv}}, powerpc-unknown-linux-gnu) (push) Has been cancelled
sha1 / cross (default, stable, aarch64-unknown-linux-gnu) (push) Has been cancelled
sha1 / cross (default, stable, powerpc-unknown-linux-gnu) (push) Has been cancelled
sha2 / build (${{needs.set-msrv.outputs.msrv}}, loongarch64-unknown-linux-gnu) (push) Has been cancelled
sha2 / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
sha2 / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
sha2 / build (stable, loongarch64-unknown-linux-gnu) (push) Has been cancelled
sha2 / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
sha2 / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
sha2 / linux (${{needs.set-msrv.outputs.msrv}}, x86_64-unknown-linux-gnu) (push) Has been cancelled
sha2 / linux (stable, x86_64-unknown-linux-gnu) (push) Has been cancelled
sha2 / linux (sudo apt update && sudo apt install gcc-multilib, ${{needs.set-msrv.outputs.msrv}}, i686-unknown-linux-gnu) (push) Has been cancelled
sha2 / linux (sudo apt update && sudo apt install gcc-multilib, stable, i686-unknown-linux-gnu) (push) Has been cancelled
sha2 / macos (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
sha2 / macos (stable) (push) Has been cancelled
sha2 / windows (${{needs.set-msrv.outputs.msrv}}, x86_64-pc-windows-gnu) (push) Has been cancelled
sha2 / windows (stable, x86_64-pc-windows-gnu) (push) Has been cancelled
sha2 / cross (default, ${{needs.set-msrv.outputs.msrv}}, aarch64-unknown-linux-gnu) (push) Has been cancelled
sha2 / cross (default, ${{needs.set-msrv.outputs.msrv}}, powerpc-unknown-linux-gnu) (push) Has been cancelled
sha2 / cross (default, stable, aarch64-unknown-linux-gnu) (push) Has been cancelled
sha2 / cross (default, stable, powerpc-unknown-linux-gnu) (push) Has been cancelled
sha2 / wasm (-C target-feature=+simd128, ${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
sha2 / wasm (-C target-feature=+simd128, stable) (push) Has been cancelled
sha2 / wasm (-C target-feature=-simd128, ${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
sha2 / wasm (-C target-feature=-simd128, stable) (push) Has been cancelled
sha3 / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
sha3 / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
sha3 / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
sha3 / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
sha3 / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
sha3 / test (stable) (push) Has been cancelled
sha3 / cross (default, ${{needs.set-msrv.outputs.msrv}}, aarch64-unknown-linux-gnu) (push) Has been cancelled
sha3 / cross (default, ${{needs.set-msrv.outputs.msrv}}, powerpc-unknown-linux-gnu) (push) Has been cancelled
sha3 / cross (default, stable, aarch64-unknown-linux-gnu) (push) Has been cancelled
sha3 / cross (default, stable, powerpc-unknown-linux-gnu) (push) Has been cancelled
shabal / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
shabal / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
shabal / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
shabal / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
shabal / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
shabal / test (stable) (push) Has been cancelled
skein / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
skein / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
skein / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
skein / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
skein / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
skein / test (stable) (push) Has been cancelled
sm3 / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
sm3 / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
sm3 / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
sm3 / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
sm3 / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
sm3 / test (stable) (push) Has been cancelled
streebog / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
streebog / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
streebog / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
streebog / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
streebog / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
streebog / test (stable) (push) Has been cancelled
tiger / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
tiger / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
tiger / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
tiger / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
tiger / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
tiger / test (stable) (push) Has been cancelled
whirlpool / build (${{needs.set-msrv.outputs.msrv}}, thumbv7em-none-eabi) (push) Has been cancelled
whirlpool / build (${{needs.set-msrv.outputs.msrv}}, wasm32-unknown-unknown) (push) Has been cancelled
whirlpool / build (stable, thumbv7em-none-eabi) (push) Has been cancelled
whirlpool / build (stable, wasm32-unknown-unknown) (push) Has been cancelled
whirlpool / test (${{needs.set-msrv.outputs.msrv}}) (push) Has been cancelled
whirlpool / test (stable) (push) Has been cancelled
70 lines
2.7 KiB
Markdown
70 lines
2.7 KiB
Markdown
# RustCrypto: GOST94
|
|
|
|
[![crate][crate-image]][crate-link]
|
|
[![Docs][docs-image]][docs-link]
|
|
![Apache2/MIT licensed][license-image]
|
|
![Rust Version][rustc-image]
|
|
[![Project Chat][chat-image]][chat-link]
|
|
[![Build Status][build-image]][build-link]
|
|
|
|
Pure Rust implementation of the [GOST R 34.11-94] cryptographic hash algorithm.
|
|
|
|
## Examples
|
|
|
|
```rust
|
|
use gost94::{Gost94CryptoPro, Digest};
|
|
use hex_literal::hex;
|
|
|
|
let mut hasher = Gost94CryptoPro::new();
|
|
hasher.update("The quick brown fox jumps over the lazy dog");
|
|
let hash = hasher.finalize();
|
|
|
|
assert_eq!(hash, hex!("9004294a361a508c586fe53d1f1b02746765e71b765472786e4770d565830a76"));
|
|
|
|
// Hex-encode hash using https://docs.rs/base16ct
|
|
let hex_hash = base16ct::lower::encode_string(&hash);
|
|
assert_eq!(hex_hash, "9004294a361a508c586fe53d1f1b02746765e71b765472786e4770d565830a76");
|
|
```
|
|
|
|
Also, see the [examples section] in the RustCrypto/hashes readme.
|
|
|
|
## Associated OIDs.
|
|
There can be a confusion regarding OIDs associated with declared types.
|
|
According to the [RFC 4357], the OIDs 1.2.643.2.2.30.1 and 1.2.643.2.2.30.0 are used to identify the hash function parameter sets (CryptoPro vs Test ones).
|
|
According to [RFC 4490] the OID 1.2.643.2.2.9 identifies the GOST 34.311-95 (former GOST R 34.11-94) function, but then it continues that this function MUST be used only with the CryptoPro parameter set.
|
|
|
|
## License
|
|
|
|
The crate is licensed under either of:
|
|
|
|
* [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
|
* [MIT license](http://opensource.org/licenses/MIT)
|
|
|
|
at your option.
|
|
|
|
### Contribution
|
|
|
|
Unless you explicitly state otherwise, any contribution intentionally submitted
|
|
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
|
|
dual licensed as above, without any additional terms or conditions.
|
|
|
|
[//]: # (badges)
|
|
|
|
[crate-image]: https://img.shields.io/crates/v/gost94.svg
|
|
[crate-link]: https://crates.io/crates/gost94
|
|
[docs-image]: https://docs.rs/gost94/badge.svg
|
|
[docs-link]: https://docs.rs/gost94/
|
|
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
|
|
[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg
|
|
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
|
|
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260041-hashes
|
|
[build-image]: https://github.com/RustCrypto/hashes/actions/workflows/gost94.yml/badge.svg?branch=master
|
|
[build-link]: https://github.com/RustCrypto/hashes/actions/workflows/gost94.yml?query=branch:master
|
|
|
|
[//]: # (general links)
|
|
|
|
[GOST R 34.11-94]: https://en.wikipedia.org/wiki/GOST_(hash_function)
|
|
[RFC 4357]: https://www.rfc-editor.org/rfc/rfc4357
|
|
[RFC 4490]: https://www.rfc-editor.org/rfc/rfc4490
|
|
[examples section]: https://github.com/RustCrypto/hashes#Examples
|