Sarkara is a Post-Quantum cryptography library.
This is an experimental library, don't use it in production environment.
[unmaintenance] A experimental post-quantum cryptography library
License: MIT License
Hey there today I tried to build sarkara, unfortunately I am encountering some errors (report below). After tracking down the messages I can find it comes from some changes in the latest nightly, unfortunately I don't have much ideas on how to fix that.
Please find here the complete track:
someone@NAME 9:14 ~/Documents/PQ/sarkara rm -rf ~/.cargo [master] git:sarkara
someone@NAME 9:14 ~/Documents/PQ/sarkara ll [master] git:sarkara
total 40
-rw-r--r-- 1 eliott eliott 430 30 nov. 20:28 appveyor.yml
drwxr-xr-x 2 eliott eliott 4096 30 nov. 20:28 benches
-rw-r--r-- 1 eliott eliott 9387 2 déc. 08:51 Cargo.lock
-rw-r--r-- 1 eliott eliott 758 2 déc. 09:11 Cargo.toml
-rw-r--r-- 1 eliott eliott 1073 30 nov. 20:28 LICENSE
-rw-r--r-- 1 eliott eliott 2348 30 nov. 20:28 README.md
drwxr-xr-x 12 eliott eliott 4096 30 nov. 20:28 src
drwxr-xr-x 4 eliott eliott 4096 2 déc. 08:52 target
someone@NAME 9:14 ~/Documents/PQ/sarkara cargo update [master] git:sarkara
Updating registry `https://github.com/rust-lang/crates.io-index`
someone@NAME 9:15 ~/Documents/PQ/sarkara cargo test [master] git:sarkara
Downloading hc256 v0.1.6
Downloading blissb v0.2.3
Downloading blake2-rfc v0.2.18
Downloading byteorder v1.2.1
Downloading argon2rs v0.2.5
Downloading seckey v0.6.1
Downloading rand v0.3.18
Downloading ascon v0.1.4
Downloading newhope v0.2.0
Downloading bitpack v0.2.1
Downloading tiny-keccak v1.4.0
Downloading libc v0.2.34
Downloading arrayvec v0.4.6
Downloading constant_time_eq v0.1.3
Downloading nodrop v0.1.12
Downloading scoped_threadpool v0.1.8
Downloading memsec v0.3.4
Compiling sarkara v0.8.0 (file:///home/eliott/Documents/PQ/sarkara)
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<_>` for type `kex::newhope::PrivateKey`:
--> src/utils/mod.rs:18:9
|
18 | / impl<T> TryFrom<T> for $name where T: AsRef<[u8]> {
19 | | type Error = io::Error;
20 | | fn try_from($input_from: T) -> io::Result<Self> {
21 | | let $input_from = $input_from.as_ref();
22 | | $from
23 | | }
24 | | }
| |_________^
|
::: src/kex/newhope.rs
|
116 | / new_type!(
117 | | /// Newhope private key.
118 | | pub struct PrivateKey(pub Key<[u16; N]>);
119 | | from: (input) {
... |
129 | | }
130 | | );
| |__- in this macro invocation
|
= note: conflicting implementation in crate `core`:
- impl<T, U> std::convert::TryFrom<U> for T
where T: std::convert::From<U>;
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<_>` for type `kex::newhope::PublicKey`:
--> src/utils/mod.rs:18:9
|
18 | / impl<T> TryFrom<T> for $name where T: AsRef<[u8]> {
19 | | type Error = io::Error;
20 | | fn try_from($input_from: T) -> io::Result<Self> {
21 | | let $input_from = $input_from.as_ref();
22 | | $from
23 | | }
24 | | }
| |_________^
|
::: src/kex/newhope.rs
|
132 | / new_type!(
133 | | /// Newhope public key.
134 | | pub struct PublicKey(pub [u8; SENDABYTES]);
135 | | from: (input) {
... |
147 | | }
148 | | );
| |__- in this macro invocation
|
= note: conflicting implementation in crate `core`:
- impl<T, U> std::convert::TryFrom<U> for T
where T: std::convert::From<U>;
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<_>` for type `kex::newhope::Reconciliation`:
--> src/utils/mod.rs:18:9
|
18 | / impl<T> TryFrom<T> for $name where T: AsRef<[u8]> {
19 | | type Error = io::Error;
20 | | fn try_from($input_from: T) -> io::Result<Self> {
21 | | let $input_from = $input_from.as_ref();
22 | | $from
23 | | }
24 | | }
| |_________^
|
::: src/kex/newhope.rs
|
150 | / new_type!(
151 | | /// Newhope reconciliation data.
152 | | pub struct Reconciliation(pub [u8; SENDBBYTES]);
153 | | from: (input) {
... |
165 | | }
166 | | );
| |__- in this macro invocation
|
= note: conflicting implementation in crate `core`:
- impl<T, U> std::convert::TryFrom<U> for T
where T: std::convert::From<U>;
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<_>` for type `sign::bliss::PrivateKey`:
--> src/utils/mod.rs:18:9
|
18 | / impl<T> TryFrom<T> for $name where T: AsRef<[u8]> {
19 | | type Error = io::Error;
20 | | fn try_from($input_from: T) -> io::Result<Self> {
21 | | let $input_from = $input_from.as_ref();
22 | | $from
23 | | }
24 | | }
| |_________^
|
::: src/sign/bliss.rs
|
84 | / new_type!(
85 | | /// BLISS private key.
86 | | pub struct PrivateKey(pub Key<::blissb::PrivateKey>);
87 | | from: (input) {
... |
102 | | }
103 | | );
| |__- in this macro invocation
|
= note: conflicting implementation in crate `core`:
- impl<T, U> std::convert::TryFrom<U> for T
where T: std::convert::From<U>;
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<_>` for type `sign::bliss::PublicKey`:
--> src/utils/mod.rs:18:9
|
18 | / impl<T> TryFrom<T> for $name where T: AsRef<[u8]> {
19 | | type Error = io::Error;
20 | | fn try_from($input_from: T) -> io::Result<Self> {
21 | | let $input_from = $input_from.as_ref();
22 | | $from
23 | | }
24 | | }
| |_________^
|
::: src/sign/bliss.rs
|
105 | / new_type!(
106 | | /// BLISS public key.
107 | | pub struct PublicKey(pub ::blissb::PublicKey);
108 | | from: (input) {
... |
123 | | }
124 | | );
| |__- in this macro invocation
|
= note: conflicting implementation in crate `core`:
- impl<T, U> std::convert::TryFrom<U> for T
where T: std::convert::From<U>;
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<_>` for type `sign::bliss::SignatureData`:
--> src/utils/mod.rs:18:9
|
18 | / impl<T> TryFrom<T> for $name where T: AsRef<[u8]> {
19 | | type Error = io::Error;
20 | | fn try_from($input_from: T) -> io::Result<Self> {
21 | | let $input_from = $input_from.as_ref();
22 | | $from
23 | | }
24 | | }
| |_________^
|
::: src/sign/bliss.rs
|
126 | / new_type!(
127 | | /// BLISS signature.
128 | | pub struct SignatureData(pub ::blissb::Signature);
129 | | from: (input) {
... |
144 | | }
145 | | );
| |__- in this macro invocation
|
= note: conflicting implementation in crate `core`:
- impl<T, U> std::convert::TryFrom<U> for T
where T: std::convert::From<U>;
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<_>` for type `kex::newhope::PrivateKey`:
--> src/utils/mod.rs:18:9
|
18 | / impl<T> TryFrom<T> for $name where T: AsRef<[u8]> {
19 | | type Error = io::Error;
20 | | fn try_from($input_from: T) -> io::Result<Self> {
21 | | let $input_from = $input_from.as_ref();
22 | | $from
23 | | }
24 | | }
| |_________^
|
::: src/kex/newhope.rs
|
116 | / new_type!(
117 | | /// Newhope private key.
118 | | pub struct PrivateKey(pub Key<[u16; N]>);
119 | | from: (input) {
... |
129 | | }
130 | | );
| |__- in this macro invocation
|
= note: conflicting implementation in crate `core`:
- impl<T, U> std::convert::TryFrom<U> for T
where T: std::convert::From<U>;
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<_>` for type `kex::newhope::PublicKey`:
--> src/utils/mod.rs:18:9
|
18 | / impl<T> TryFrom<T> for $name where T: AsRef<[u8]> {
19 | | type Error = io::Error;
20 | | fn try_from($input_from: T) -> io::Result<Self> {
21 | | let $input_from = $input_from.as_ref();
22 | | $from
23 | | }
24 | | }
| |_________^
|
::: src/kex/newhope.rs
|
132 | / new_type!(
133 | | /// Newhope public key.
134 | | pub struct PublicKey(pub [u8; SENDABYTES]);
135 | | from: (input) {
... |
147 | | }
148 | | );
| |__- in this macro invocation
|
= note: conflicting implementation in crate `core`:
- impl<T, U> std::convert::TryFrom<U> for T
where T: std::convert::From<U>;
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<_>` for type `kex::newhope::Reconciliation`:
--> src/utils/mod.rs:18:9
|
18 | / impl<T> TryFrom<T> for $name where T: AsRef<[u8]> {
19 | | type Error = io::Error;
20 | | fn try_from($input_from: T) -> io::Result<Self> {
21 | | let $input_from = $input_from.as_ref();
22 | | $from
23 | | }
24 | | }
| |_________^
|
::: src/kex/newhope.rs
|
150 | / new_type!(
151 | | /// Newhope reconciliation data.
152 | | pub struct Reconciliation(pub [u8; SENDBBYTES]);
153 | | from: (input) {
... |
165 | | }
166 | | );
| |__- in this macro invocation
|
= note: conflicting implementation in crate `core`:
- impl<T, U> std::convert::TryFrom<U> for T
where T: std::convert::From<U>;
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<_>` for type `sign::bliss::PrivateKey`:
--> src/utils/mod.rs:18:9
|
18 | / impl<T> TryFrom<T> for $name where T: AsRef<[u8]> {
19 | | type Error = io::Error;
20 | | fn try_from($input_from: T) -> io::Result<Self> {
21 | | let $input_from = $input_from.as_ref();
22 | | $from
23 | | }
24 | | }
| |_________^
|
::: src/sign/bliss.rs
|
84 | / new_type!(
85 | | /// BLISS private key.
86 | | pub struct PrivateKey(pub Key<::blissb::PrivateKey>);
87 | | from: (input) {
... |
102 | | }
103 | | );
| |__- in this macro invocation
|
= note: conflicting implementation in crate `core`:
- impl<T, U> std::convert::TryFrom<U> for T
where T: std::convert::From<U>;
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<_>` for type `sign::bliss::PublicKey`:
--> src/utils/mod.rs:18:9
|
18 | / impl<T> TryFrom<T> for $name where T: AsRef<[u8]> {
19 | | type Error = io::Error;
20 | | fn try_from($input_from: T) -> io::Result<Self> {
21 | | let $input_from = $input_from.as_ref();
22 | | $from
23 | | }
24 | | }
| |_________^
|
::: src/sign/bliss.rs
|
105 | / new_type!(
106 | | /// BLISS public key.
107 | | pub struct PublicKey(pub ::blissb::PublicKey);
108 | | from: (input) {
... |
123 | | }
124 | | );
| |__- in this macro invocation
|
= note: conflicting implementation in crate `core`:
- impl<T, U> std::convert::TryFrom<U> for T
where T: std::convert::From<U>;
error[E0119]: conflicting implementations of trait `std::convert::TryFrom<_>` for type `sign::bliss::SignatureData`:
--> src/utils/mod.rs:18:9
|
18 | / impl<T> TryFrom<T> for $name where T: AsRef<[u8]> {
19 | | type Error = io::Error;
20 | | fn try_from($input_from: T) -> io::Result<Self> {
21 | | let $input_from = $input_from.as_ref();
22 | | $from
23 | | }
24 | | }
| |_________^
|
::: src/sign/bliss.rs
|
126 | / new_type!(
127 | | /// BLISS signature.
128 | | pub struct SignatureData(pub ::blissb::Signature);
129 | | from: (input) {
... |
144 | | }
145 | | );
| |__- in this macro invocation
|
= note: conflicting implementation in crate `core`:
- impl<T, U> std::convert::TryFrom<U> for T
where T: std::convert::From<U>;
error: aborting due to 6 previous errors
error: Could not compile `sarkara`.
warning: build failed, waiting for other jobs to finish...
error: aborting due to 6 previous errors
error: Could not compile `sarkara`.
To learn more, run the command again with --verbose.
zsh: exit 101 cargo test
someone@NAME 9:15 ~/Documents/PQ/sarkara [master] git:sarkara
Recently lattice cryptography has been threatened, and perhaps we should try to use other public-key algorithms that are not based on lattices?
Although the Eldar-Shor algorithm was found to be seriously flawed, but it reminded us not to rely too heavily on lattice cryptography.
Hi, if I look at the Sealedbox example, you are using bliss keys. I would like to know if it is possible (and safe) to use one keypair (either newhope or bliss) to crypt, decrypt and sign data.
Hi @quininer,
Was playing with sarkara::sealedbox
as of today and found me struggling with a small problem, my goal is to extract the AeadCipher
out of the Opening<AE>
or Sealing<AE>
objects, however I am simply failing. Am I supposed to do it in a precise way?
Tried the dumb way of sealedbox_instance.0
but it tells me 0
is a private field, experiencing with implementing a custom trait at the moment.
It is crytographically unsound to key use keys in a NewHope.
Should SealedBox open own and then delete PrivateKey instead of borrowing it to prevent reuse?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.