sequoia-autocrypt-0.25.1/.cargo_vcs_info.json0000644000000001470000000000100146210ustar { "git": { "sha1": "480ab2440afca45313425013c12e847adc31d871" }, "path_in_vcs": "autocrypt" }sequoia-autocrypt-0.25.1/Cargo.toml0000644000000033660000000000100126250ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2021" rust-version = "1.60" name = "sequoia-autocrypt" version = "0.25.1" authors = [ "Justus Winter ", "Kai Michaelis ", "Neal H. Walfield ", ] description = "Autocrypt support" homepage = "https://sequoia-pgp.org/" documentation = "https://docs.rs/sequoia-autocrypt" readme = "README.md" keywords = [ "autocrypt", "mua", "opportunistic", "mail", "encryption", ] categories = [ "cryptography", "authentication", "email", ] license = "LGPL-2.0-or-later" repository = "https://gitlab.com/sequoia-pgp/sequoia" resolver = "2" [package.metadata.docs.rs] features = ["sequoia-openpgp/default"] [lib] bench = false [dependencies.base64] version = "0.21" [dependencies.sequoia-openpgp] version = "1.13" default-features = false [target."cfg(not(windows))".dev-dependencies.sequoia-openpgp] version = "1" features = [ "crypto-nettle", "__implicit-crypto-backend-for-tests", ] default-features = false [target."cfg(windows)".dev-dependencies.sequoia-openpgp] version = "1" features = [ "crypto-cng", "__implicit-crypto-backend-for-tests", ] default-features = false [badges.gitlab] repository = "sequoia-pgp/sequoia" [badges.maintenance] status = "actively-developed" sequoia-autocrypt-0.25.1/Cargo.toml.orig000064400000000000000000000026430072674642500163330ustar 00000000000000[package] name = "sequoia-autocrypt" description = "Autocrypt support" version = "0.25.1" authors = [ "Justus Winter ", "Kai Michaelis ", "Neal H. Walfield ", ] documentation = "https://docs.rs/sequoia-autocrypt" homepage = "https://sequoia-pgp.org/" repository = "https://gitlab.com/sequoia-pgp/sequoia" readme = "README.md" keywords = ["autocrypt", "mua", "opportunistic", "mail", "encryption"] categories = ["cryptography", "authentication", "email"] license = "LGPL-2.0-or-later" edition = "2021" rust-version = "1.60" [badges] gitlab = { repository = "sequoia-pgp/sequoia" } maintenance = { status = "actively-developed" } [dependencies] sequoia-openpgp = { path = "../openpgp", version = "1.13", default-features = false } base64 = "0.21" [lib] bench = false # Enables a crypto backend for the tests: [target.'cfg(not(windows))'.dev-dependencies] sequoia-openpgp = { path = "../openpgp", version = "1", default-features = false, features = ["crypto-nettle", "__implicit-crypto-backend-for-tests"] } # Enables a crypto backend for the tests: [target.'cfg(windows)'.dev-dependencies] sequoia-openpgp = { path = "../openpgp", version = "1", default-features = false, features = ["crypto-cng", "__implicit-crypto-backend-for-tests"] } # Enables a crypto backend for the docs.rs generation: [package.metadata.docs.rs] features = ["sequoia-openpgp/default"] sequoia-autocrypt-0.25.1/LICENSE.txt000064400000000000000000000627340072674642500152760ustar 00000000000000Sequoia PGP is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Sequoia PGP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. --- GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! sequoia-autocrypt-0.25.1/README.md000064400000000000000000000005450072674642500147220ustar 00000000000000This crate deals with Autocrypt encoded data (see the [Autocrypt Spec]). [Autocrypt Spec]: https://autocrypt.org/level1.html#openpgp-based-key-data # Scope This implements low-level functionality like encoding and decoding of Autocrypt headers and setup messages. Note: Autocrypt is more than just headers; it requires tight integration with the MUA. sequoia-autocrypt-0.25.1/src/cert.rs000064400000000000000000000046250072674642500155400ustar 00000000000000use sequoia_openpgp as openpgp; use openpgp::packet; use openpgp::cert::prelude::*; use openpgp::types::{ KeyFlags, }; use super::{ Autocrypt, }; /// Generates a key compliant to /// [Autocrypt](https://autocrypt.org/). /// /// If no version is given the latest one is used. /// /// The autocrypt specification requires a UserID. However, /// because it can be useful to add the UserID later, it is /// permitted to be none. pub fn cert_builder<'a, V, U>(version: V, userid: Option) -> CertBuilder<'a> where V: Into>, U: Into { let builder = CertBuilder::new() .set_cipher_suite(match version.into().unwrap_or_default() { Autocrypt::V1 => CipherSuite::RSA3k, Autocrypt::V1_1 => CipherSuite::Cv25519, }) .set_primary_key_flags( KeyFlags::empty() .set_certification() .set_signing()) .add_subkey( KeyFlags::empty() .set_transport_encryption() .set_storage_encryption(), None, None); if let Some(userid) = userid { builder.add_userid(userid.into()) } else { builder } } #[cfg(test)] mod tests { use super::*; use openpgp::types::PublicKeyAlgorithm; #[test] fn autocrypt_v1() { let (cert1, _) = cert_builder(Autocrypt::V1, Some("Foo")) .generate().unwrap(); assert_eq!(cert1.primary_key().pk_algo(), PublicKeyAlgorithm::RSAEncryptSign); assert_eq!(cert1.keys().subkeys().next().unwrap().key().pk_algo(), PublicKeyAlgorithm::RSAEncryptSign); assert_eq!(cert1.userids().count(), 1); } #[test] fn autocrypt_v1_1() { let (cert1, _) = cert_builder(Autocrypt::V1_1, Some("Foo")) .generate().unwrap(); assert_eq!(cert1.primary_key().pk_algo(), PublicKeyAlgorithm::EdDSA); assert_eq!(cert1.keys().subkeys().next().unwrap().key().pk_algo(), PublicKeyAlgorithm::ECDH); match cert1.keys().subkeys().next().unwrap().key().mpis() { openpgp::crypto::mpi::PublicKey::ECDH { curve: openpgp::types::Curve::Cv25519, .. } => (), m => panic!("unexpected mpi: {:?}", m), } assert_eq!(cert1.userids().count(), 1); } } sequoia-autocrypt-0.25.1/src/lib.rs000064400000000000000000001131710072674642500153460ustar 00000000000000//! This crate deals with Autocrypt encoded data (see the [Autocrypt //! Spec]). //! //! [Autocrypt Spec]: https://autocrypt.org/level1.html#openpgp-based-key-data //! //! # Scope //! //! This implements low-level functionality like encoding and decoding //! of Autocrypt headers and setup messages. Note: Autocrypt is more //! than just headers; it requires tight integration with the MUA. #![doc(html_favicon_url = "https://docs.sequoia-pgp.org/favicon.png")] #![doc(html_logo_url = "https://docs.sequoia-pgp.org/logo.svg")] #![warn(missing_docs)] use std::convert::TryFrom; use std::io; use std::io::prelude::*; use std::io::BufReader; use std::path::Path; use std::fs::File; use std::str; use base64::Engine; use base64::engine::general_purpose::STANDARD as base64std; use sequoia_openpgp as openpgp; use openpgp::armor; use openpgp::Error; pub use openpgp::Result; use openpgp::Packet; use openpgp::packet::SKESK; use openpgp::cert::prelude::*; use openpgp::parse::{ Parse, PacketParserResult, PacketParser, }; use openpgp::serialize::Serialize; use openpgp::serialize::stream::{ Message, LiteralWriter, Encryptor, }; use openpgp::crypto::Password; use openpgp::policy::Policy; use openpgp::types::RevocationStatus; mod cert; pub use cert::cert_builder; /// Version of Autocrypt to use. `Autocrypt::default()` always returns the /// latest version. pub enum Autocrypt { /// Autocrypt <= 1.0.1 V1, /// Autocrypt version 1.1 (January 2019) V1_1, } impl Default for Autocrypt { fn default() -> Self { Autocrypt::V1_1 } } /// An autocrypt header attribute. #[derive(Debug, PartialEq)] pub struct Attribute { /// Whether the attribute is critical. pub critical: bool, /// The attribute's name. /// /// If the attribute is not critical, the leading underscore has /// been stripped. pub key: String, /// The attribute's value. pub value: String, } /// Whether the data comes from an "Autocrypt" or "Autocrypt-Gossip" /// header. #[derive(Debug, PartialEq)] pub enum AutocryptHeaderType { /// An "Autocrypt" header. Sender, /// An "Autocrypt-Gossip" header. Gossip, } /// A parsed Autocrypt header. #[derive(Debug, PartialEq)] pub struct AutocryptHeader { /// Whether this is an "Autocrypt" or "Autocrypt-Gossip" header. pub header_type: AutocryptHeaderType, /// The parsed key data. pub key: Option, /// All attributes. pub attributes: Vec, } impl AutocryptHeader { fn empty(header_type: AutocryptHeaderType) -> Self { AutocryptHeader { header_type, key: None, attributes: Vec::new(), } } /// Creates a new "Autocrypt" header. pub fn new_sender<'a, P>(policy: &dyn Policy, cert: &Cert, addr: &str, prefer_encrypt: P) -> Result where P: Into> { // Minimize Cert. let mut acc = Vec::new(); // The primary key and the most recent selfsig. let primary = cert.primary_key().with_policy(policy, None)?; acc.push(primary.key().clone().into()); primary.self_signatures().take(1) .for_each(|s| acc.push(s.clone().into())); // The subkeys and the most recent selfsig. for skb in cert.keys().with_policy(policy, None).subkeys() { // Skip if revoked. if let RevocationStatus::Revoked(_) = skb.revocation_status() { continue; } if skb.for_signing() || skb.for_transport_encryption() { let k = skb.key().clone(); acc.push(k.into()); acc.push(skb.binding_signature().clone().into()); } } // The UserIDs matching ADDR. let mut found_one = false; for uidb in cert.userids().with_policy(policy, None) { // XXX: Fix match once we have the rfc2822-name-addr. if let Ok(Some(a)) = uidb.userid().email() { if a == addr { acc.push(uidb.userid().clone().into()); acc.push(uidb.binding_signature().clone().into()); found_one = true; } else { // Address is not matching. continue; } } else { // Malformed UserID. continue; } } // User ids are only decorative in Autocrypt. By convention, // the cert should include a user id matching the sender's // address, but we should include at least one user id. if ! found_one { if let Ok(uidb) = cert.with_policy(policy, None)?.primary_userid() { acc.push(uidb.userid().clone().into()); acc.push(uidb.binding_signature().clone().into()); } } let cleaned_cert = Cert::try_from(acc)?; Ok(AutocryptHeader { header_type: AutocryptHeaderType::Sender, key: Some(cleaned_cert), attributes: vec![ Attribute { critical: true, key: "addr".into(), value: addr.into(), }, Attribute { critical: true, key: "prefer-encrypt".into(), value: prefer_encrypt.into() .unwrap_or("nopreference").into(), }, ], }) } /// Looks up an attribute. pub fn get(&self, key: &str) -> Option<&Attribute> { for a in &self.attributes { if a.key == key { return Some(a); } } None } /// Writes a serialized version of the object to `o`. pub fn serialize(&self, o: &mut dyn std::io::Write) -> Result<()> { if self.key.is_none() { return Err(Error::InvalidOperation("No key".into()).into()); } for attr in self.attributes.iter() { write!(o, "{}={}; ", attr.key, attr.value)?; } let mut buf = Vec::new(); self.key.as_ref().unwrap().serialize(&mut buf)?; write!(o, "keydata={} ", base64std.encode(&buf))?; Ok(()) } } /// A set of parsed Autocrypt headers. #[derive(Debug, PartialEq)] pub struct AutocryptHeaders { /// The value in the from header. pub from: Option, /// Any autocrypt headers. pub headers: Vec, } impl AutocryptHeaders { fn empty() -> Self { AutocryptHeaders { from: None, headers: Vec::new(), } } fn from_lines>>(mut lines: I) -> Result { let mut headers = AutocryptHeaders::empty(); let mut next_line = lines.next(); while let Some(line) = next_line { // Return any error. let mut line = line?; if line.is_empty() { // End of headers. break; } next_line = lines.next(); // If the line is folded (a line break was inserted in // front of whitespace (either a space (0x20) or a // horizontal tab (0x09)), then unfold it. // // See https://tools.ietf.org/html/rfc5322#section-2.2.3 while let Some(Ok(nl)) = next_line { if !nl.is_empty() && (nl.starts_with(|c| c == ' ' || c == '\t')) { line.push_str(&nl); next_line = lines.next(); } else { // Put it back. next_line = Some(Ok(nl)); break; } } const AUTOCRYPT : &str = "Autocrypt: "; const AUTOCRYPT_GOSSIP : &str = "Autocrypt-Gossip: "; const FROM : &str = "From: "; if let Some(rest) = line.strip_prefix(FROM) { headers.from = Some(rest.trim_matches(' ').into()); } else { if let Some((key, value)) = if let Some(v) = line.strip_prefix(AUTOCRYPT) { Some((AutocryptHeaderType::Sender, v)) } else if let Some(v) = line.strip_prefix(AUTOCRYPT_GOSSIP) { Some((AutocryptHeaderType::Gossip, v)) } else { None } { headers.headers.push( Self::decode_autocrypt_like_header(key, value)); } } } Ok(headers) } /// Decode header that has the same format as the Autocrypt header. /// This function should be called only on "Autocrypt" or "Autocrypt-Gossip" /// headers. fn decode_autocrypt_like_header(header_type: AutocryptHeaderType, ac_value: &str) -> AutocryptHeader { let mut header = AutocryptHeader::empty(header_type); for pair in ac_value.split(';') { let pair = pair .splitn(2, '=') .collect::>(); let (key, value) : (&str, String) = if pair.len() == 1 { // No value... (pair[0].trim_matches(' '), "".into()) } else { (pair[0].trim_matches(' '), pair[1].trim_matches(' ').into()) }; if key == "keydata" { if let Ok(decoded) = base64std.decode( &value.replace(' ', "")[..]) { if let Ok(cert) = Cert::from_bytes(&decoded[..]) { header.key = Some(cert); } } } let (critical, key) = if let Some(key) = key.strip_prefix('_') { (true, key) } else { (false, key) }; header.attributes.push(Attribute { critical, key: key.to_string(), value, }); } header } /// Parses an autocrypt header. /// /// `data` should be all of a mail's headers. pub fn from_bytes(data: &[u8]) -> Result { let lines = BufReader::new(io::Cursor::new(data)).lines(); Self::from_lines(lines) } /// Parses an autocrypt header. /// /// `path` should name a file containing a single mail. If the /// file is in mbox format, then only the first mail is /// considered. pub fn from_file>(path: P) -> Result { Self::from_reader(File::open(path)?) } /// Parses an autocrypt header. /// /// `reader` contain a single mail. If it contains multiple /// emails, then only the first mail is considered. pub fn from_reader(reader: R) -> Result { Self::from_lines(BufReader::new(reader).lines()) } } /// Holds an Autocrypt Setup Message. /// /// An [Autocrypt Setup Message] is used to transfer a private key from /// one device to another. /// /// [Autocrypt Setup Message]: /// https://autocrypt.org/level1.html#autocrypt-setup-message #[derive(Debug, PartialEq)] pub struct AutocryptSetupMessage { prefer_encrypt: Option, passcode_format: Option, passcode: Option, // We only emit a "Passcode-Begin" header if this is set. Note: // we don't check if this actually matches the start of the // passcode. passcode_begin: Option, cert: Cert, } impl AutocryptSetupMessage { /// Creates a new Autocrypt Setup Message for the specified `Cert`. /// /// You can set the `prefer_encrypt` setting, which defaults to /// "nopreference", using `set_prefer_encrypt`. /// /// Note: this generates a random passcode. To retrieve the /// passcode, use the `passcode` method. /// /// To decode an Autocrypt Setup Message, use the `from_bytes` or /// `from_reader` methods. pub fn new(cert: Cert) -> Self { AutocryptSetupMessage { prefer_encrypt: None, passcode: None, passcode_format: None, passcode_begin: None, cert, } } /// Sets the prefer encrypt header. pub fn set_prefer_encrypt(mut self, value: &str) -> Self { self.prefer_encrypt = Some(value.into()); self } /// Returns the prefer encrypt header. pub fn prefer_encrypt(&self) -> Option<&str> { self.prefer_encrypt.as_ref().map(|v| &v[..]) } /// Sets the "Passcode-Format" header. pub fn set_passcode_format(mut self, value: &str) -> Self { self.passcode_format = Some(value.into()); self } /// Returns the "Passcode-Format" header. pub fn passcode_format(&self) -> Option<&str> { self.passcode_format.as_ref().map(|v| &v[..]) } /// Sets the passcode. pub fn set_passcode(mut self, passcode: Password) -> Self { self.passcode = Some(passcode); self } /// Returns the ASM's passcode. /// /// If the passcode has not yet been generated, this returns /// `None`. pub fn passcode(&self) -> Option<&Password> { self.passcode.as_ref() } /// Sets the "Passcode-Begin" header. pub fn set_passcode_begin(mut self, value: &str) -> Self { self.passcode_begin = Some(value.into()); self } /// Returns the "Passcode-Begin" header. pub fn passcode_begin(&self) -> Option<&str> { self.passcode_begin.as_ref().map(|v| &v[..]) } // Generates a new passcode in "numeric9x4" format. fn passcode_gen() -> Password { use openpgp::crypto::mem; // Generate a random passcode. // The passcode consists of 36 digits, which encode // approximately 119 bits of information. 120 bits = 15 // bytes. let mut p_as_vec = mem::Protected::from(vec![0; 15]); openpgp::crypto::random(&mut p_as_vec[..]); // Turn it into a 128-bit number. let mut p_as_u128 = 0u128; for v in p_as_vec.iter() { p_as_u128 = (p_as_u128 << 8) + *v as u128; } // Turn it into ASCII. let mut p : Vec = Vec::new(); for i in 0..36 { if i > 0 && i % 4 == 0 { p.push(b'-'); } p.push(b'0' + ((p_as_u128 as u8) % 10)); p_as_u128 /= 10; } p.into() } /// If there is no passcode, generates one. fn passcode_ensure(&mut self) { if self.passcode.is_some() { return; } let passcode = Self::passcode_gen(); self.passcode_format = Some("numeric9x4".into()); self.passcode_begin = passcode.map(|p| { Some(str::from_utf8(&p[..2]).unwrap().into()) }); self.passcode = Some(passcode); } /// Generates the Autocrypt Setup Message. /// /// The message is written to `w`. pub fn serialize(&mut self, w: &mut W) -> Result<()> where W: io::Write + Send + Sync, { // The outer message is an ASCII-armored encoded message // containing a single SK-ESK and a single SEIP packet. The // SEIP packet contains a literal data packet whose content is // the inner message. self.passcode_ensure(); let mut headers : Vec<(&str, &str)> = Vec::new(); if let Some(ref format) = self.passcode_format { headers.push( ("Passphrase-Format", &format[..])); } if let Some(ref begin) = self.passcode_begin { headers.push( ("Passphrase-Begin", &begin[..])); } let mut armor_writer = armor::Writer::with_headers(w, armor::Kind::Message, headers)?; { // Passphrase-Format header with value numeric9x4 let m = Message::new(&mut armor_writer); let m = Encryptor::with_passwords( m, vec![self.passcode.clone().unwrap()]).build()?; let m = LiteralWriter::new(m).build()?; // The inner message is an ASCII-armored encoded Cert. let mut w = armor::Writer::with_headers( m, armor::Kind::SecretKey, vec![("Autocrypt-Prefer-Encrypt", self.prefer_encrypt().unwrap_or("nopreference"))])?; self.cert.as_tsk().serialize(&mut w)?; let m = w.finalize()?; m.finalize()?; } armor_writer.finalize()?; Ok(()) } /// Parses the autocrypt setup message in `r`. /// /// `passcode` is the passcode used to protect the message. pub fn from_bytes(bytes: &[u8]) -> Result { Self::from_reader(bytes) } /// Parses the autocrypt setup message in `r`. /// /// `passcode` is the passcode used to protect the message. pub fn from_reader<'a, R: io::Read + Send + Sync + 'a>(r: R) -> Result> { // The outer message uses ASCII-armor. It includes a password // hint. Hence, we need to parse it aggressively. let mut r = armor::Reader::from_reader( r, armor::ReaderMode::Tolerant(Some(armor::Kind::Message))); // Note, it is essential that we call r.headers here so that // we can return any error now and not in // AutocryptSetupMessageParser::header. let (format, begin) = { let headers = r.headers()?; let format = headers.iter() .filter_map(|(k, v)| { if k == "Passphrase-Format" { Some(v) } else { None } }) .collect::>(); let format = if !format.is_empty() { // If there are multiple headers, then just silently take // the first one. Some(format[0].clone()) } else { None }; let begin = headers.iter() .filter_map(|(k, v)| { if k == "Passphrase-Begin" { Some(v) } else { None } }) .collect::>(); let begin = if !begin.is_empty() { // If there are multiple headers, then just silently take // the first one. Some(begin[0].clone()) } else { None }; (format, begin) }; // Get the first packet, which is the SK-ESK packet. let mut ppr = PacketParser::from_reader(r)?; // The outer message consists of exactly three packets: a // SK-ESK and a SEIP packet, which contains a Literal data // packet. let pp = if let PacketParserResult::Some(pp) = ppr { pp } else { return Err( Error::MalformedMessage( "Premature EOF: expected an SK-ESK, encountered EOF".into()) .into()); }; let (packet, ppr_) = pp.next()?; ppr = ppr_; let skesk = match packet { Packet::SKESK(skesk) => skesk, p => return Err( Error::MalformedMessage( format!("Expected a SKESK packet, found a {}", p.tag())) .into()), }; let pp = match ppr { PacketParserResult::EOF(_) => return Err( Error::MalformedMessage( "Pre-mature EOF after reading SK-ESK packet".into()) .into()), PacketParserResult::Some(pp) => { match pp.packet { Packet::SEIP(_) => (), ref p => return Err( Error::MalformedMessage( format!("Expected a SEIP packet, found a {}", p.tag())) .into()), } pp } }; Ok(AutocryptSetupMessageParser { passcode_format: format, passcode_begin: begin, skesk, pp, passcode: None, }) } /// Returns the Cert consuming the `AutocryptSetupMessage` in the /// process. pub fn into_cert(self) -> Cert { self.cert } } /// A Parser for an `AutocryptSetupMessage`. pub struct AutocryptSetupMessageParser<'a> { passcode_format: Option, passcode_begin: Option, skesk: SKESK, pp: PacketParser<'a>, passcode: Option, } impl<'a> AutocryptSetupMessageParser<'a> { /// Returns the "Passcode-Format" header. pub fn passcode_format(&self) -> Option<&str> { self.passcode_format.as_ref().map(|v| &v[..]) } /// Returns the "Passcode-Begin" header. pub fn passcode_begin(&self) -> Option<&str> { self.passcode_begin.as_ref().map(|v| &v[..]) } /// Tries to decrypt the message. /// /// On success, follow up with /// `AutocryptSetupMessageParser::parse()` to extract the /// `AutocryptSetupMessage`. pub fn decrypt(&mut self, passcode: &Password) -> Result<()> { if self.pp.processed() { return Err( Error::InvalidOperation("Already decrypted".into()).into()); } let (algo, key) = self.skesk.decrypt(passcode)?; self.pp.decrypt(algo, &key)?; self.passcode = Some(passcode.clone()); Ok(()) } /// Finishes parsing the `AutocryptSetupMessage`. /// /// Before calling this, you must decrypt the payload using /// `decrypt`. /// /// If the payload has not been decrypted, returns /// `Error::InvalidOperation`. /// /// If the payload is malformed, returns /// `Error::MalformedMessage`. pub fn parse(self) -> Result { if ! self.pp.processed() { return Err( Error::InvalidOperation("Not decrypted".into()).into()); } // Recurse into the SEIP packet. let mut ppr = self.pp.recurse()?.1; if ppr.as_ref().map(|pp| pp.recursion_depth()).ok() != Some(1) { return Err( Error::MalformedMessage( "SEIP container empty, but expected a Literal Data packet" .into()) .into()); } // Get the literal data packet. let (prefer_encrypt, cert) = if let PacketParserResult::Some(mut pp) = ppr { match pp.packet { Packet::Literal(_) => (), p => return Err(Error::MalformedMessage( format!("SEIP container contains a {}, \ expected a Literal Data packet", p.tag())).into()), } // The inner message consists of an ASCII-armored encoded // Cert. let (prefer_encrypt, cert) = { let mut r = armor::Reader::from_reader( &mut pp, armor::ReaderMode::Tolerant( Some(armor::Kind::SecretKey))); let prefer_encrypt = { let headers = r.headers()?; let prefer_encrypt = headers.iter() .filter_map(|(k, v)| { if k == "Autocrypt-Prefer-Encrypt" { Some(v) } else { None } }) .collect::>(); if !prefer_encrypt.is_empty() { // If there are multiple headers, then just // silently take the first one. Some(prefer_encrypt[0].clone()) } else { None } }; let cert = Cert::from_reader(r)?; (prefer_encrypt, cert) }; ppr = pp.recurse()?.1; (prefer_encrypt, cert) } else { return Err( Error::MalformedMessage( "Pre-mature EOF after reading SEIP packet".into()) .into()); }; // Get the MDC packet. if let PacketParserResult::Some(pp) = ppr { match pp.packet { Packet::MDC(_) => (), ref p => return Err(Error::MalformedMessage( format!("Expected an MDC packet, got a {}", p.tag())) .into()), } ppr = pp.recurse()?.1; } // Make sure we reached the end of the outer message. match ppr { PacketParserResult::EOF(pp) => { // If we've gotten this far, then the outer message // has the right sequence of packets, but we haven't // carefully checked the nesting. We do that now. if let Err(err) = pp.is_message() { return Err(err.context("Invalid OpenPGP Message")); } } PacketParserResult::Some(pp) => return Err(Error::MalformedMessage( format!("Extraneous packet: {}.", pp.packet.tag())) .into()), } // We're done! Ok(AutocryptSetupMessage { prefer_encrypt, passcode: self.passcode, passcode_format: self.passcode_format, passcode_begin: self.passcode_begin, cert, }) } } #[cfg(test)] mod test { use super::*; use openpgp::policy::StandardPolicy as P; #[test] fn decode_test() { let ac = AutocryptHeaders::from_bytes( &include_bytes!("../tests/data/hpk.txt")[..] ) .unwrap(); //eprintln!("ac: {:#?}", ac); // We expect exactly one Autocrypt header. assert_eq!(ac.headers.len(), 1); assert_eq!(ac.headers[0].header_type, AutocryptHeaderType::Sender); assert_eq!(ac.headers[0].get("addr").unwrap().value, "holger@merlinux.eu"); assert_eq!(ac.headers[0].get("prefer-encrypt").unwrap().value, "mutual"); let cert = ac.headers[0].key.as_ref() .expect("Failed to parse key material."); assert_eq!(cert.fingerprint(), "156962B0F3115069ACA970C68E3B03A279B772D6".parse().unwrap()); assert_eq!(cert.userids().next().unwrap().value(), &b"holger krekel "[..]); let ac = AutocryptHeaders::from_bytes( &include_bytes!("../tests/data/vincent.txt")[..] ) .unwrap(); //eprintln!("ac: {:#?}", ac); assert_eq!(ac.from, Some("Vincent Breitmoser ".into())); // We expect exactly one Autocrypt header. assert_eq!(ac.headers.len(), 1); assert_eq!(ac.headers[0].get("addr").unwrap().value, "look@my.amazin.horse"); assert!(ac.headers[0].get("prefer_encrypt").is_none()); let cert = ac.headers[0].key.as_ref() .expect("Failed to parse key material."); assert_eq!(cert.fingerprint(), "D4AB192964F76A7F8F8A9B357BD18320DEADFA11".parse().unwrap()); assert_eq!(cert.userids().next().unwrap().value(), &b"Vincent Breitmoser "[..]); let ac = AutocryptHeaders::from_bytes( &include_bytes!("../tests/data/patrick.txt")[..] ) .unwrap(); //eprintln!("ac: {:#?}", ac); assert_eq!(ac.from, Some("Patrick Brunschwig ".into())); // We expect exactly one Autocrypt header. assert_eq!(ac.headers.len(), 1); assert_eq!(ac.headers[0].get("addr").unwrap().value, "patrick@enigmail.net"); assert!(ac.headers[0].get("prefer_encrypt").is_none()); let cert = ac.headers[0].key.as_ref() .expect("Failed to parse key material."); assert_eq!(cert.fingerprint(), "4F9F89F5505AC1D1A260631CDB1187B9DD5F693B".parse().unwrap()); assert_eq!(cert.userids().next().unwrap().value(), &b"Patrick Brunschwig "[..]); let ac2 = AutocryptHeaders::from_bytes( &include_bytes!("../tests/data/patrick_unfolded.txt")[..] ) .unwrap(); assert_eq!(ac, ac2); } #[test] fn decode_gossip() { let ac = AutocryptHeaders::from_bytes( &include_bytes!("../tests/data/gossip.txt")[..] ) .unwrap(); //eprintln!("ac: {:#?}", ac); // We expect exactly two Autocrypt headers. assert_eq!(ac.headers.len(), 2); assert_eq!(ac.headers[0].header_type, AutocryptHeaderType::Gossip); assert_eq!(ac.headers[0].get("addr").unwrap().value, "dkg@fifthhorseman.net"); assert_eq!(ac.headers[1].get("addr").unwrap().value, "neal@walfield.org"); let cert = ac.headers[0].key.as_ref() .expect("Failed to parse key material."); assert_eq!(cert.fingerprint(), "C4BC2DDB38CCE96485EBE9C2F20691179038E5C6".parse().unwrap()); assert_eq!(cert.userids().next().unwrap().value(), &b"Daniel Kahn Gillmor "[..]); } #[test] fn passcode_gen_test() { let mut dist = [0usize; 10]; let samples = 8 * 1024; // 36 digits grouped into four digits, each group // separated by a dash. let digits = 36; let passcode_len = 36 + (36 / 4 - 1); for _ in 0..samples { let p = AutocryptSetupMessage::passcode_gen(); p.map(|p| { assert_eq!(p.len(), passcode_len); for c in p.iter() { match *c as char { '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9' => { let i = *c as usize - ('0' as usize); dist[i] = dist[i] + 1 }, '-' => (), _ => panic!("Unexpected character in passcode: {}", c), } } }); } // Make sure the distribution is reasonable. If this runs // long enough, then of course, this test will eventually // fail. But, it is extremely unlikely and suggests a failure // in the random number generator or the code. let expected_value = (samples * digits) as f32 / 10.; // We expect each digit to occur within 10% of its expected // value. let lower = (expected_value * 0.9) as usize; let upper = (expected_value * 1.1) as usize; let expected_value = expected_value as usize; eprintln!("Distribution (expected value: {}, bounds: {}..{}):", expected_value, lower, upper); let mut bad = 0; for (i, count) in dist.iter() .map(|x| *x) .enumerate() .collect::>() { let is_good = lower < count && count < upper; eprintln!("{}: {} occurrences{}.", i, count, if is_good { "" } else { " UNLIKELY" }); if !is_good { bad = bad + 1; } } // Allow one digit to be out of the bounds. // // Dear developer: if this test has failed more than once for // you over years of development, then there is almost // certainly a bug! Report it, please! assert!(bad <= 1); } #[test] fn autocrypt_setup_message() { // Try the example autocrypt setup message. let mut asm = AutocryptSetupMessage::from_bytes( &include_bytes!("../tests/data/setup-message.txt")[..]).unwrap(); // A bad passcode. assert!(asm.decrypt(&"123".into()).is_err()); // Now the right one. assert!(asm.decrypt( &"1742-0185-6197-1303-7016-8412-3581-4441-0597".into() ).is_ok()); let asm = asm.parse().unwrap(); // A basic check to make sure we got the key. assert_eq!(asm.into_cert().fingerprint(), "E604 68CE 44D7 7C3F CE9F D072 71DB C565 7FDE 65A7".parse() .unwrap()); // Create an ASM for testy-private. Then decrypt it and make // sure the Cert, etc. survived the round trip. let cert = Cert::from_bytes(&include_bytes!("../tests/data/testy-private.pgp")[..]) .unwrap(); let mut asm = AutocryptSetupMessage::new(cert) .set_prefer_encrypt("mutual"); let mut buffer = Vec::new(); asm.serialize(&mut buffer).unwrap(); let mut asm2 = AutocryptSetupMessage::from_bytes(&buffer[..]).unwrap(); asm2.decrypt(asm.passcode().unwrap()).unwrap(); let asm2 = asm2.parse().unwrap(); assert_eq!(asm, asm2); } #[test] fn autocrypt_header_new() { let p = &P::new(); let cert = Cert::from_bytes(&include_bytes!("../tests/data/testy.pgp")[..]) .unwrap(); let header = AutocryptHeader::new_sender(p, &cert, "testy@example.org", "mutual").unwrap(); let mut buf = Vec::new(); write!(&mut buf, "Autocrypt: ").unwrap(); header.serialize(&mut buf).unwrap(); let ac = AutocryptHeaders::from_bytes(&buf).unwrap(); // We expect exactly one Autocrypt header. assert_eq!(ac.headers.len(), 1); assert_eq!(ac.headers[0].get("addr").unwrap().value, "testy@example.org"); assert_eq!(ac.headers[0].get("prefer-encrypt").unwrap().value, "mutual"); let cert = ac.headers[0].key.as_ref() .expect("Failed to parse key material."); assert_eq!(&cert.fingerprint().to_hex(), "3E8877C877274692975189F5D03F6F865226FE8B"); assert_eq!(cert.userids().len(), 1); assert_eq!(cert.keys().subkeys().count(), 1); assert_eq!(cert.userids().next().unwrap().userid().value(), &b"Testy McTestface "[..]); } #[test] fn autocrypt_header_new_address_mismatch() -> Result<()> { let p = &P::new(); let cert = Cert::from_bytes(&include_bytes!("../tests/data/testy.pgp")[..])?; let header = AutocryptHeader::new_sender(p, &cert, "anna-lena@example.org", "mutual")?; let mut buf = Vec::new(); write!(&mut buf, "Autocrypt: ")?; header.serialize(&mut buf)?; let ac = AutocryptHeaders::from_bytes(&buf)?; // We expect exactly one Autocrypt header. assert_eq!(ac.headers.len(), 1); assert_eq!(ac.headers[0].get("addr").unwrap().value, "anna-lena@example.org"); assert_eq!(ac.headers[0].get("prefer-encrypt").unwrap().value, "mutual"); let cert = ac.headers[0].key.as_ref() .expect("Failed to parse key material."); assert_eq!(&cert.fingerprint().to_hex(), "3E8877C877274692975189F5D03F6F865226FE8B"); assert_eq!(cert.userids().len(), 1); assert_eq!(cert.keys().subkeys().count(), 1); assert_eq!(cert.userids().next().unwrap().userid().value(), &b"Testy McTestface "[..]); Ok(()) } /// Demonstrates a panic in the AutocryptHeader parser. #[test] fn issue_743() { let data: Vec = vec![ 0x41, 0x75, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x0a, 0xc4, 0x83, 0x40, 0x39, 0x0a, 0x38, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x20, 0x74, 0x6f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x3a, 0x00, 0x00, 0x0a, 0x0a, 0x0a, 0x0a, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x35, 0x39, 0x33, 0x35, 0x38, 0x36, 0x34, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x3f, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x01, 0x08, 0x00, 0x00, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x72, 0x79, 0x20, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x70, ]; let _ = AutocryptHeaders::from_bytes(&data); } #[test] fn issue_1012() { let data: Vec = vec![ 0x41, 0x75, 0x74, 0x6f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x2d, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x3a, 0x20, 0xc8, 0x84, 0x01, 0x42, 0x04, 0x0a, 0x00, 0x00, 0x00, 0x25, 0x25, 0x25, 0x25, 0x42, 0x25, 0x3f, 0x21, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x00, 0x40, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x22, 0x6b, 0x25, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, ]; AutocryptHeaders::from_bytes(&data).expect("parses"); } } sequoia-autocrypt-0.25.1/tests/data/README.txt000064400000000000000000000001740072674642500172120ustar 00000000000000setup-message.txt: Taken from the autocrypt v1.0 specification. https://autocrypt.org/level1.html#setup-message-example sequoia-autocrypt-0.25.1/tests/data/gossip.txt000064400000000000000000000121150072674642500175570ustar 00000000000000Autocrypt-Gossip: addr=dkg@fifthhorseman.net; keydata= mDMEXEK/AhYJKwYBBAHaRw8BAQdAr/gSROcn+6m8ijTN0DV9AahoHGafy52RRkhCZVwxhEe0 K0RhbmllbCBLYWhuIEdpbGxtb3IgPGRrZ0BmaWZ0aGhvcnNlbWFuLm5ldD6ImQQTFggAQQIb AQUJA8JnAAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgBYhBMS8Lds4zOlkhevpwvIGkReQOOXG BQJcQsbzAhkBAAoJEPIGkReQOOXG4fkBAO1joRxqAZY57PjdzGieXLpluk9RkWa3ufkt3YUV EpH/AP9c+pgIxtyW+FwMQRjlqljuj8amdN4zuEqaCy4hhz/1DbgzBFxCv4sWCSsGAQQB2kcP AQEHQERSZxSPmgtdw6nNu7uxY7bzb9TnPrGAOp9kClBLRwGfiPUEGBYIACYWIQTEvC3bOMzp ZIXr6cLyBpEXkDjlxgUCXEK/iwIbAgUJAeEzgACBCRDyBpEXkDjlxnYgBBkWCAAdFiEEyQ5t NiAKG5IqFQnndhgZZSmuX/gFAlxCv4sACgkQdhgZZSmuX/iVWgD/fCU4ONzgy8w8UCHGmrmI ZfDvdhg512NIBfx+Mz9ls5kA/Rq97vz4z48MFuBdCuu0W/fVqVjnY7LN5n+CQJwGC0MIA7QA /RyY7Sz2gFIOcrns0RpoHr+3WI+won3xCD8+sVXSHZvCAP98HCjDnw/b0lGuCR7coTXKLIM4 4/LFWg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SlFC81OE9qber6gAsCAbA c3rlevzL6NkxnElQfecxPtYoVBORDk+X0bvbwW6WHvllci+r8yYIpKUzuNQZ/5DnE1vJA1MI Y0xUXYIMfaSTlzQLKDPvRkMQJ6g4AMMBBMt9OX2f00LOMMGJ0Tb7PhDYwCk5jw2jMqseIl4y RLVXiWLvjnms6TihDxGIQzpNU9CTZGps348GM6mr7LGG8CnW5D4Cv/g++p2uDFN2dNixs+UF ddzgVpCgAp7QorK5HOFCEvwMGxYjBcI6IYbKbzj93O98L4Mnr0OUqK6p4USdwgCRoS1gKMZm yi2vMwARAQABiQIQBBgBCgAmAhsMFiEEjxd3cRijPdqbpI5iqssyQ2MAUtkFAlywiP0FCQtP SUUACgkQqssyQ2MAUtnA1g6fVRvQE+lSZ5Yb4w6QSG6CCGsjUDuZvwh2P24fGUdQaWQsi929 FZoYQ9Hd3t5MkAPqNCZcpjds7z16jZE2sqHESzP6wgOCKi69uYGuvTzRpUpXEmYsa0l7OIk+ 88ebRU/Kj1KX+PxbCyDj1B9Mk7Zx3M0/v87/+jtHCILVL/ZxIOJTB/f/bHGSDTuHfbcItOjh eS6TYm2i6tQPewGiateLQ25hLPjVt+tIVAcgnzGTERfXjGeSnY1hODYBam7ynorwcItAElg5 TXHVDCJ7xli3H8MnLpLFpPfY+e3krqJWRVwL39fwah/2Y60hM4J/byeiBKzz3u/Zi5NgHWOn 0I+Vm/c0AdmA/LxmrCz1WbF0MYPq09pvuxkXg4NptUxn8lIFYUlLWL5Qv4WR0ocLS67Iieny XlIwbe3T2SPqISVLWBJBdsw2p9TqqS7T0i41daYcFyPrLAILLEs2Zrh88i/0bXZDMTV6E/6a GWluAV36k0QziinMPpeKyuGiZf3ELBqeAoJ0YdWH62HXpnaEm+lGxxAzsitf3QENEMmda621 BQFYapg16oofuQT17e0wTCPAvEIhFk6leoDZz9HPXA7b3sncMFSJ9jlGKAOSZURbxHOwin6l ... sequoia-autocrypt-0.25.1/tests/data/hpk.txt000064400000000000000000000052200072674642500170340ustar 00000000000000Cc: autocrypt@lists.mayfirst.org, delta@codespeak.net Subject: Re: [Autocrypt] [delta-chat] DeltaX gathering 16-24th july ongoings From: holger krekel Delivery-date: Mon, 18 Jun 2018 19:21:24 +0200 DMARC-Filter: OpenDMARC Filter v1.2.0 mail.merlinux.eu 3E7561006EB Date: Mon, 18 Jun 2018 19:21:10 +0200 Message-ID: <20180618172110.GB21885@beto> Autocrypt: addr=holger@merlinux.eu; prefer-encrypt=mutual; keydata= mQENBFHjpUYBCADtXtH0nIjMpuaWgOvcg6/bBJKhDW9mosTOYH1XaArGG2REhgTh8CyU27qPG+1NKO qm5VT4JWfG91TgvBQdx37ejiLxK9pkqkDMSSHCd5+6lPpgYOTueejToVHTRcHLp2fv7DOJ1s+G05TX T6gesTVvCyNXpGJN/RXbfF5XOBb4Q+5rp7t9ygjb9F97zkeT6YKAAtYqnZNUvamfmNK+vKFyhwhWJX 0Fb6qP3cvlxh4kXbeVdRjlf1Bg17OVcS1uUTI51W67x7vKgOWSUx1gpArq/YYg43o0kcnzj1mEUdjw gu7qAOwoq3b9tHefG971/3/zbPC6lpli7oUV7cfdmSZPABEBAAG0ImhvbGdlciBrcmVrZWwgPGhvbG dlckBtZXJsaW51eC5ldT6JATsEEwECACUCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheABQJR5XTc AhkBAAoJEI47A6J5t3LWGFYH/iG8e2Rn6D/Z5q7vAF00SCkRYzhDqVEx7bX/YazmfiUQImjBnbZZa5 zCQZSDYjAZdwNKBUpdG8Xlc+TI5qLBNEiapOPUYUaaJuG6GtaRF0E36yqvh//VDnCpeeurpn4EhyFB 2SeoMqNxVhv0gdzUi8jp9fHlWNvvYgeTU2y3+9EXGLgayoDPEoUSSF8AOSa3SkgzDnTWNTOVrHJ5UV j2mZTW6HBYPfnKmu/3aERlDH0pOYHBT1bzT6JRBvADZsEln8OM2ODyMjFNiUb7IHbpQb2JETFdMY54 E6gT7pCwleE/K3yovWsUdrJo6YruU2xdlC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JDSJeUZuRgz+aE7+38edwFi3jwb8gOB3QhrrKo4fL1nMHrrgZK4+n8so5Np4OhX0RBkfy8Jj idxg9xawubYJDHcjc242Wl/gcAIUcnQZ4tEFOL55SCgih1LtlQLsrdnkJgnGI7VepNL1MwMXnAvfIb 1CvHBWNRmnPMaFMeSpgJ List-Archive: Errors-To: autocrypt-bounces+neal=walfield.org@lists.mayfirst.org On Mon, Jun 18, 2018 at 10:11 -0700, Karissa McKelvey wrote: ... sequoia-autocrypt-0.25.1/tests/data/patrick.txt000064400000000000000000000075040072674642500177160ustar 00000000000000To: GnuPG Users List , openpgp-email@enigmail.net Subject: [openpgp-email] Efail - Possible Measures? From: Patrick Brunschwig Delivery-date: Sat, 19 May 2018 18:47:34 +0200 X-Authenticated-Sender-Id: patrick@enigmail.net Openpgp: id=4F9F89F5505AC1D1A260631CDB1187B9DD5F693B Autocrypt: addr=patrick@enigmail.net; prefer-encrypt=mutual; keydata= xsFNBFS6eEEBEAC56tAm82tgg5BJE0dA4c5UNUDQ7SKLIsleh7TrwsKocEp1b34EHTmLJQG9 Zqoia0mnywG1IYzyZdFwQ0JjXwd9LbiTfLcxYrJ1i+fMw6+mlg2boIXNrnh8lYwFus0z63/K LglIPdJ8LzXyq03iy/WwEhJvxUs3dmURPslWZTjgDl7SuGJ4BU9A/egc/Rfe5+LQqnQ6M9yb +QuEUGJEQBxPLt0C2wX3b3e1k8E7H9Ho4wbXtz+qjBZ5Hwkd6yB3QE56uRVwvpEhbQhhQJJF edQKeQTfpi8Z5Nb/d4wQODT8wWyph+2Ur8b8gJwghs7oHaDZ4JQbJsCmkasWo2iVi+cr/cqp 6aohqoP/FK0B8Mh2Li6VqhVnkZGXtbQhALSmzdOkJLniuQJYNkFNww1SlCU3s3XR2Kf3MiRD lXvn+SJp2/JmDbKYeDnzp9r2ZgfpZgMAES5nFlF7Jov+N5iMO5kFtPYOD1ZwUB1aBYyWHwiF Gbz+V3ZN/5YpSy3i6qvS2pOF6EZuEI2ceujroh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LoUYxWYNkF5vl2buKSaDu7gavwOnhO4Pv9q t0jjOp99Z2dJXXHJqvUYSbID9xYk66/1Rz1GmOIoF7fXmXlSua4l/cG3/dyKeY88WlpuULfj YZYSazM12WaxUnk0KFYXLJMEeWvgKuaG8wWBHUlwqZll776iyEYH/sBCkchuwwmiFk/t7wzY 1WYJhI8juvI7QJVOovmd1CBHhj9Y9UxgPOPpfsjUD6dZ42I+WnY+hRRS90IuKxjVpTXDJMlr vAGwsBGyuFeTn9HWlC0GWT4InvK0fLoSfznjZsH/IL5n3/NZtW6G Message-ID: Date: Sat, 19 May 2018 18:47:08 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.0 List-Archive: Reply-To: OpenPGP-based Email Encryption Errors-To: openpgp-email-bounces@enigmail.net In the light of the Efail vulnerability I am asking myself if it's ... sequoia-autocrypt-0.25.1/tests/data/patrick_unfolded.txt000064400000000000000000000075600072674642500216000ustar 00000000000000To: GnuPG Users List , openpgp-email@enigmail.net Subject: [openpgp-email] Efail - Possible Measures? From: Patrick Brunschwig Delivery-date: Sat, 19 May 2018 18:47:34 +0200 X-Authenticated-Sender-Id: patrick@enigmail.net Openpgp: id=4F9F89F5505AC1D1A260631CDB1187B9DD5F693B Autocrypt: addr=patrick@enigmail.net; prefer-encrypt=mutual; keydata= xsFNBFS6eEEBEAC56tAm82tgg5BJE0dA4c5UNUDQ7SKLIsleh7TrwsKocEp1b34EHTmLJQG9 Zqoia0mnywG1IYzyZdFwQ0JjXwd9LbiTfLcxYrJ1i+fMw6+mlg2boIXNrnh8lYwFus0z63/K LglIPdJ8LzXyq03iy/WwEhJvxUs3dmURPslWZTjgDl7SuGJ4BU9A/egc/Rfe5+LQqnQ6M9yb +QuEUGJEQBxPLt0C2wX3b3e1k8E7H9Ho4wbXtz+qjBZ5Hwkd6yB3QE56uRVwvpEhbQhhQJJF edQKeQTfpi8Z5Nb/d4wQODT8wWyph+2Ur8b8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iRnNl9ztw5+4JUNB17yp/IPoUG+5ehQZ/i4gtmdL7JoXcaNz AmNhlJhPFFOJO/lUw0mssL7KdoGZSFVtRoiWbc17XOLdCYKPO9IYM5Q20CF28YeThJyo/G9H +Femtvpgev9GW9XU59Rz+mCymMiduU20RbX82MqWlNSD9c75G1l2iS2NscSWrzPpK9/KB0Kr kUh3pt66UqYgycEw5Lkjy0L+l6bDOf9o0GB3uLoUYxWYNkF5vl2buKSaDu7gavwOnhO4Pv9q t0jjOp99Z2dJXXHJqvUYSbID9xYk66/1Rz1GmOIoF7fXmXlSua4l/cG3/dyKeY88WlpuULfj YZYSazM12WaxUnk0KFYXLJMEeWvgKuaG8wWBHUlwqZll776iyEYH/sBCkchuwwmiFk/t7wzY 1WYJhI8juvI7QJVOovmd1CBHhj9Y9UxgPOPpfsjUD6dZ42I+WnY+hRRS90IuKxjVpTXDJMlr vAGwsBGyuFeTn9HWlC0GWT4InvK0fLoSfznjZsH/IL5n3/NZtW6G Message-ID: Date: Sat, 19 May 2018 18:47:08 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.0 List-Archive: Reply-To: OpenPGP-based Email Encryption Errors-To: openpgp-email-bounces@enigmail.net In the light of the Efail vulnerability I am asking myself if it's ... sequoia-autocrypt-0.25.1/tests/data/setup-message.txt000064400000000000000000000166410072674642500210450ustar 00000000000000

This is the Autocrypt setup file used to transfer settings and keys between clients. You can decrypt it using the Setup Code presented on your old device, and then import the contained key into your keyring.

-----BEGIN PGP MESSAGE-----
Passphrase-Format: numeric9x4
Passphrase-Begin: 17

wy4ECQMI0jNRBQfVKHVg1+a2Yihd6JAjR9H0kk3oDVeX7nc4Oi+IjEtonUJt
PQpO0tPWASWYuYvjZSuTz9r1yZYV+y4mu9bu9NEQoRlWg2wnbjoUoKk4emFF
FweUj84iI6VWTCSRyMu5d5JS1RfOdX4CG/muLAegyIHezqYOEC0Z3b9Ci9rd
DiSgqqN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AMadU/+Pqn
uZzP941mOUV5UeTCCbjpyfI7qtIi3TH1cQmC2kG2HrvQYuM6Momp//JusH1+
9eHgFo25HbitcKJ1sAqxsnYIW5/jIVyIJC7tatxmNfFQQ/LUb2cT+Jowwsf4
bbPinA9S6aQFy9k3vk07V2ouYl+cpMMXmNAUrboFRLxw7QDapWYMKdmnbU5O
HZuDz3iyrm0lMPsRtt/f5WUhZYY4vXT5/dj+8P6Pr5fdc4S84i5qEzf7bX/I
Sc6fpISdYBscfHdv6uXsEVtVPKEuQVYwhyc4kkwVKjZBaqsgjAA7VEhQXzO3
rC7di4UhabWQCQTG1GYZyrj4bm6dg/32uVxMoLS5kuSpi3nMz5JmQahLqRxh
argg13K2/MJ7w2AI23gCvO5bEmD1ZXIi1aGYdZfu7+KqrTumYxj0KgIesgU0
6ekmPh4Zu5lIyKopa89nfQVj3uKbwr9LLHegfzeMhvI5WQWghKcNcXEvJwSA
vEik5aXm2qSKXT+ijXBy5MuNeICoGaQ5WA0OJ30Oh5dN0XpLtFUWHZKThJvR
mngm1QCMMw2v/j8=
=9sJE
-----END PGP MESSAGE-----
sequoia-autocrypt-0.25.1/tests/data/testy-private.pgp000064400000000000000000000047540072674642500210540ustar 00000000000000Zr2%E$O:pbx£.&.|W^';CBL}M5j΍$F=_+ tKt3ja1W朧LEsA9}&ٲ-5tdjY%1'hV-?ҡ~6!GܩGtBc3LH&bAF}E.륒J H/{X2'kEngl;+1 ';Rר 5bB0pz?yB+͇^@Dq^HM3ZmeQoSIJ{z\_|aōL/E" בYz[]Fw{SINp͸C_z;O䔟xEb4B@(2MPKhwTLtGPhvecci}XKÓ`@.>2gnG#Fщ:Ғ,Wwd+B[8c[ "hҕ`?+~fL*l >^.F`߰]%Wv aִ5}5pN4bIrn%^ʠ^h6L*S aÍ{Ik,$Λ$\y=lqV+%۫!Y?Oaie4rM<=8$Testy McTestface T>!>ww'FQ?oR&Zr g   ?oR&ƏU̷jkHo|)gP4c̈́"KˏQߜY-{\CCwܞXH-֠{ @VQF A\|w46(f{Zr傮>YGh<">;v7R_YދFkM$E9u񆇴:'JSZ1ޙ54&("<!+ E`Z9Z$#-P;=JrxE3Y9m+R^j{E`*;*Aff'3]p Gڷartj`D]VX^|M.̚\f+I7I(\< WRhNSp^nV߇Vz579"8 J.p"<)G4kJe~`T`X&({ST̲~#"ʍy7j?: xWi0Ĺ"LhtueVu!!(RH*'uu+:a@zĔ$ᜎL2{`[X`&ճLXRNdOGQݞ71tQTMwuOirGO,'1M_J<M?BoNܜD] & }[VOA孉dPZ 58eD)V Bt1&*|[k,ε ZNe[+a \6 !>ww'FQ?oR&Zr ?oR&3<Ʀ'Xm 9C2!QLG/$8|m{G>^1}E) $^1hlyS$c`fP䦈OO۵mo'?dxI3TMABUÙˊ1hr|]mHᚕsfQ0N/ZH+,ȿ!짱oB+ɹ~u>q>{;V:'5B/1C6^pZsequoia-autocrypt-0.25.1/tests/data/testy.pgp000064400000000000000000000023260072674642500173750ustar 00000000000000 Zr2%E$O:pbx£.&.|W^';CBL}M5j΍$F=_+ tKt3ja1W朧LEsA9}&ٲ-5tdjY%1'hV-?ҡ~6!GܩGtBc3T>!>ww'FQ?oR&Zr g   ?oR&ƏU̷jkHo|)gP4c̈́"KˏQߜY-{\CCwܞXH-֠{ @VQF A\|w46(f{¹ Zr傮>YGh<">;v7R_YދFkM$E9u񆇴:'JSZ1ޙ54&("<!+ E`Z9Z$#-P;=JrxE3Y9m+R^j{E`*;*Aff'3]p Gڷartj`D]VX^|M.̚\f+I76 !>ww'FQ?oR&Zr ?oR&3<Ʀ'Xm 9C2!QLG/$8|m{G>^1}E) $^1hlyS$c`fP䦈OO۵mo'?dxI3TMABUÙˊ1hr|]mHᚕsfQ0N/ZH+,ȿ!짱oB+ɹ~u>q>{;V:'5B/1C6^pZsequoia-autocrypt-0.25.1/tests/data/vincent.txt000064400000000000000000000067260072674642500177340ustar 00000000000000To: gnupg-devel , sks-devel@nongnu.org, Autocrypt , openpgp-email Subject: Keyservers and GDPR From: Vincent Breitmoser Delivery-date: Tue, 22 May 2018 21:45:08 +0200 Date: Tue, 22 May 2018 21:44:09 +0200 Message-ID: <20180522194409.tmrteipcsoorisns@calamity> Autocrypt: addr=look@my.amazin.horse; keydata=mQINBFAB3UABEADCyB/vbIBA3m1Bwc yjTieEMLySwYgt54EQ2hglOocdtIhqC+b05t6sLSkwx2ukxrU2cegnCBkdyF/FZ/+Et638CUEBbf 4bjplwpt2IPLazQgjkwjMuhz0OcYDpMhwimTvh3mIl+0wzpOts6mEmMw0QZdl3RXvIW+NSynOn7q mz/fAv4Htt6lv2Ka0s6R2voyi+5U7CcIqizPad5qZVn2uxmovcFreTzFt6nk37ZbbTfvA3e5F0bR RQeH3viT5XxpJF4Y76v/Ua+5N3Kd18K0sX85rD1G7cmxR2CZ5gW1X24sDqdYZdDbf10N39UIwjJH PTeuVMQqry792Ap0Etyj135YFCE0loDnZYKvy2Y1i0RuEdTUIonIHrLhe2J0bXQGbQImHIyMgB9/ lva8D+yvy2gyf2vjRhmJEEco7w9FdzP7p3PhKrUiTjRsjHw8iV8LOCFx9njZOq9mism9ZZ16tZpx 9mXOf11HcH1RtVuyyQRS/4ytQPzwshXdSDDW6Btkmo9AbZQKC54/hSyzpp3Br2T2xDH7ecnonDB/ jv8rWuKXSTbX3xWAIrNBNDcTYaNe4jkms4HF7jJE19eRlqsXMMx6Fxvrh4TtKICwJYJ3AUmXrK3X Ti/mjqYfJ1fpBn54rWs8nhSR1fuZPD+aMlcP8BDUPlNKPKtj0DGSh3/VlnnwARAQABtClWaW5jZW 50IEJyZWl0bW9zZXIgPGxvb2tAbXkuYW1hemluLmhvcnNlPokCOAQTAQIAIgUCVTNZmgIbAwYLCQ gHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQe9GDIN6t+hHcVg//aeiijNqsQ3pjbFQn3VvND7hNfJ vrVcLZ+U4kOzXPF818aVdOnDyNXyE17vBDDcvaZ730sCsZIRZJ3KhUJ+nPvdttKjUIGLARmx+pA3 J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