diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2021-12-23 13:36:04 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2022-01-03 10:58:57 +0100 |
commit | 4d60e6c47aadcab95b31a6217776be43f3bc924c (patch) | |
tree | bf90309c54e21cd9e74fa653653eed7032ff7e72 | |
parent | ee14246c2243ded95034a5846c510efd7dde8a34 (diff) |
sq: Add missing test vectors.
- Previously, the tests for sq sign used test vectors from the
openpgp crate. But, those are not bundled with the sq crate,
breaking the test when using the crate's source tarball.
- Fixes #787.
-rw-r--r-- | sq/tests/data/keys/dennis-simon-anton-private.pgp | bin | 0 -> 1020 bytes | |||
-rw-r--r-- | sq/tests/data/keys/dennis-simon-anton.pgp | bin | 0 -> 983 bytes | |||
-rw-r--r-- | sq/tests/data/keys/emmelie-dorothea-dina-samantha-awina-ed25519.pgp | bin | 0 -> 539 bytes | |||
-rw-r--r-- | sq/tests/data/keys/erika-corinna-daniela-simone-antonia-nistp256-private.pgp | bin | 0 -> 310 bytes | |||
-rw-r--r-- | sq/tests/data/keys/erika-corinna-daniela-simone-antonia-nistp256.pgp | bin | 0 -> 273 bytes | |||
-rw-r--r-- | sq/tests/data/keys/neal.pgp | bin | 0 -> 25741 bytes | |||
-rw-r--r-- | sq/tests/data/messages/a-cypherpunks-manifesto.txt | 99 | ||||
-rw-r--r-- | sq/tests/data/messages/signed-1-notarized-by-ed25519.pgp | bin | 0 -> 5626 bytes | |||
-rw-r--r-- | sq/tests/data/messages/signed-1.gpg | bin | 0 -> 5519 bytes | |||
-rw-r--r-- | sq/tests/sq-sign.rs | 2 |
10 files changed, 100 insertions, 1 deletions
diff --git a/sq/tests/data/keys/dennis-simon-anton-private.pgp b/sq/tests/data/keys/dennis-simon-anton-private.pgp Binary files differnew file mode 100644 index 00000000..62fc6f4b --- /dev/null +++ b/sq/tests/data/keys/dennis-simon-anton-private.pgp diff --git a/sq/tests/data/keys/dennis-simon-anton.pgp b/sq/tests/data/keys/dennis-simon-anton.pgp Binary files differnew file mode 100644 index 00000000..7549d8cb --- /dev/null +++ b/sq/tests/data/keys/dennis-simon-anton.pgp diff --git a/sq/tests/data/keys/emmelie-dorothea-dina-samantha-awina-ed25519.pgp b/sq/tests/data/keys/emmelie-dorothea-dina-samantha-awina-ed25519.pgp Binary files differnew file mode 100644 index 00000000..db07d8d4 --- /dev/null +++ b/sq/tests/data/keys/emmelie-dorothea-dina-samantha-awina-ed25519.pgp diff --git a/sq/tests/data/keys/erika-corinna-daniela-simone-antonia-nistp256-private.pgp b/sq/tests/data/keys/erika-corinna-daniela-simone-antonia-nistp256-private.pgp Binary files differnew file mode 100644 index 00000000..f952c1bb --- /dev/null +++ b/sq/tests/data/keys/erika-corinna-daniela-simone-antonia-nistp256-private.pgp diff --git a/sq/tests/data/keys/erika-corinna-daniela-simone-antonia-nistp256.pgp b/sq/tests/data/keys/erika-corinna-daniela-simone-antonia-nistp256.pgp Binary files differnew file mode 100644 index 00000000..8790f5d6 --- /dev/null +++ b/sq/tests/data/keys/erika-corinna-daniela-simone-antonia-nistp256.pgp diff --git a/sq/tests/data/keys/neal.pgp b/sq/tests/data/keys/neal.pgp Binary files differnew file mode 100644 index 00000000..7106b2af --- /dev/null +++ b/sq/tests/data/keys/neal.pgp diff --git a/sq/tests/data/messages/a-cypherpunks-manifesto.txt b/sq/tests/data/messages/a-cypherpunks-manifesto.txt new file mode 100644 index 00000000..cdf045b7 --- /dev/null +++ b/sq/tests/data/messages/a-cypherpunks-manifesto.txt @@ -0,0 +1,99 @@ +A Cypherpunk's Manifesto +by Eric Hughes + +Privacy is necessary for an open society in the electronic +age. Privacy is not secrecy. A private matter is something one doesn't +want the whole world to know, but a secret matter is something one +doesn't want anybody to know. Privacy is the power to selectively +reveal oneself to the world. + +If two parties have some sort of dealings, then each has a memory of +their interaction. Each party can speak about their own memory of +this; how could anyone prevent it? One could pass laws against it, but +the freedom of speech, even more than privacy, is fundamental to an +open society; we seek not to restrict any speech at all. If many +parties speak together in the same forum, each can speak to all the +others and aggregate together knowledge about individuals and other +parties. The power of electronic communications has enabled such group +speech, and it will not go away merely because we might want it to. + +Since we desire privacy, we must ensure that each party to a +transaction have knowledge only of that which is directly necessary +for that transaction. Since any information can be spoken of, we must +ensure that we reveal as little as possible. In most cases personal +identity is not salient. When I purchase a magazine at a store and +hand cash to the clerk, there is no need to know who I am. When I ask +my electronic mail provider to send and receive messages, my provider +need not know to whom I am speaking or what I am saying or what others +are saying to me; my provider only need know how to get the message +there and how much I owe them in fees. When my identity is revealed by +the underlying mechanism of the transaction, I have no privacy. I +cannot here selectively reveal myself; I must always reveal myself. + +Therefore, privacy in an open society requires anonymous transaction +systems. Until now, cash has been the primary such system. An +anonymous transaction system is not a secret transaction system. An +anonymous system empowers individuals to reveal their identity when +desired and only when desired; this is the essence of privacy. + +Privacy in an open society also requires cryptography. If I say +something, I want it heard only by those for whom I intend it. If the +content of my speech is available to the world, I have no privacy. To +encrypt is to indicate the desire for privacy, and to encrypt with +weak cryptography is to indicate not too much desire for +privacy. Furthermore, to reveal one's identity with assurance when the +default is anonymity requires the cryptographic signature. + +We cannot expect governments, corporations, or other large, faceless +organizations to grant us privacy out of their beneficence. It is to +their advantage to speak of us, and we should expect that they will +speak. To try to prevent their speech is to fight against the +realities of information. Information does not just want to be free, +it longs to be free. Information expands to fill the available storage +space. Information is Rumor's younger, stronger cousin; Information is +fleeter of foot, has more eyes, knows more, and understands less than +Rumor. + +We must defend our own privacy if we expect to have any. We must come +together and create systems which allow anonymous transactions to take +place. People have been defending their own privacy for centuries with +whispers, darkness, envelopes, closed doors, secret handshakes, and +couriers. The technologies of the past did not allow for strong +privacy, but electronic technologies do. + +We the Cypherpunks are dedicated to building anonymous systems. We are +defending our privacy with cryptography, with anonymous mail +forwarding systems, with digital signatures, and with electronic +money. + +Cypherpunks write code. We know that someone has to write software to +defend privacy, and since we can't get privacy unless we all do, we're +going to write it. We publish our code so that our fellow Cypherpunks +may practice and play with it. Our code is free for all to use, +worldwide. We don't much care if you don't approve of the software we +write. We know that software can't be destroyed and that a widely +dispersed system can't be shut down. + +Cypherpunks deplore regulations on cryptography, for encryption is +fundamentally a private act. The act of encryption, in fact, removes +information from the public realm. Even laws against cryptography +reach only so far as a nation's border and the arm of its +violence. Cryptography will ineluctably spread over the whole globe, +and with it the anonymous transactions systems that it makes possible. + +For privacy to be widespread it must be part of a social +contract. People must come and together deploy these systems for the +common good. Privacy only extends so far as the cooperation of one's +fellows in society. We the Cypherpunks seek your questions and your +concerns and hope we may engage you so that we do not deceive +ourselves. We will not, however, be moved out of our course because +some may disagree with our goals. + +The Cypherpunks are actively engaged in making the networks safer for +privacy. Let us proceed together apace. + +Onward. + +Eric Hughes <hughes@soda.berkeley.edu> + +9 March 1993 diff --git a/sq/tests/data/messages/signed-1-notarized-by-ed25519.pgp b/sq/tests/data/messages/signed-1-notarized-by-ed25519.pgp Binary files differnew file mode 100644 index 00000000..251bce08 --- /dev/null +++ b/sq/tests/data/messages/signed-1-notarized-by-ed25519.pgp diff --git a/sq/tests/data/messages/signed-1.gpg b/sq/tests/data/messages/signed-1.gpg Binary files differnew file mode 100644 index 00000000..9728be18 --- /dev/null +++ b/sq/tests/data/messages/signed-1.gpg diff --git a/sq/tests/sq-sign.rs b/sq/tests/sq-sign.rs index 4836e2fe..34400eec 100644 --- a/sq/tests/sq-sign.rs +++ b/sq/tests/sq-sign.rs @@ -15,7 +15,7 @@ use crate::openpgp::parse::Parse; use crate::openpgp::serialize::stream::{Message, Signer, Compressor, LiteralWriter}; fn artifact(filename: &str) -> String { - format!("../openpgp/tests/data/{}", filename) + format!("tests/data/{}", filename) } #[test] |