-
Notifications
You must be signed in to change notification settings - Fork 1
Crypto for educational use and cloudproxy
License
jlmucb/crypto
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Crypto Project ============== This code was written for educational purposes and to experiment with some of Google's public source code, mainly protobuf, gtest and gflags. It may also be incorporated into Cloudproxy at some point after I do more testing but maybe not. [2020: not. Cloudproxy uses the GO crypto library] License ------- Except as expressly set forth in particular files, all files in this project are licensed under the Apache 2.0 license, a copy of which is in this main directory in the file LICENSE-2.0.txt. Pre-existing code license incorporated in this project ------------------------------------------------------ Tinyxml (in the xml subdirectory) [No longer used] Downloaded from https://github.com/leethomason/tinyxml2 http://www.grinninglizard.com/tinyxml2/ on September 4, 2014 Original author: License granted by original authors retained in files (tinyxml2 is not currently compiled or linked into the code). Sha1, sha256 Downloaded from http://sourceforge.net/projects/cryptopp/files/cryptopp/5.6.2/cryptopp562.zip on September 4, 2014 Original author: Wei Dai License granted by original authors: Steve Reid implemented SHA-1. Wei Dai implemented SHA-2. Both are in the public domain. Aes Downloaded from ftp://ftp.aci.com.pl/pub/security/cryptography/algorithms/aes/aes-c-rijmen on September 4, 2014 Original authors: Vincent Rijmen <[email protected]> Antoon Bosselaers <[email protected]> Paulo Barreto <[email protected]> License from original authors All code contained in this distributed is placed in the public domain. Disclaimer: THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Protobuf sample code from the protobuf-2.5.0 public distribution. Gtest sample code from the gtest-1.7.0 public distribution. Original licenses: Copyright 2008, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Simple Twofish by Niels Ferguson License Fast, portable, and easy-to-use Twofish implementation, Version 0.3. Copyright (c) 2002 by Niels Ferguson. The author hereby grants a perpetual license to everybody to use this code for any purpose as long as the copyright message is included in the source code of this or any derived work. Yes, this means that you, your company, your club, and anyone else can use this code anywhere you want. You can change it and distribute it under the GPL, include it in your commercial product without releasing the source code, put it on the web, etc. Timing attacks -------------- This code is not meant to be resistant to timing attacks. In fact, it is extremely not timing attack resistant. To make it resistant requires changing all the calculations be fixed length and "if-free". So my advice in not to use it for on-line encryption/decryption without extensive changes. How to build ------------ For v1, the command buildall in the root directory builds all the code once you set up directories for the object files and binaries. I put binaries in ~/cryptobin and object files in ~/cryptoobj (in several subdirectories). Most of the executables buildall builds are tests; however, there is a command line utility called cryptutil. In v2, make_all_tests.sh builds everything. You need a c-11 compiler with the standard libraries, protobuf, gtest and gflags all of which are available in open source. Currently, the code is Intel64 only (the assembly assist assumes Intel64 and RNG and aes use Ivy Bridge and later instructions for aesni and RNG). Feedback -------- I welcome corrections and suggestions. Please do not send material that you are not authorized to send. All feedback will be treated as licensed under the same terms as this code; so don't send any information or feedback that you cannot or do not wish to license under those terms. Version 2 --------- In September, 2020, I rewrote most of the cryptocode to be cleaner and align with my current C++ coding style. The new version is in v2. I also added LLL and some lattice based crypto. The original version remains in the v1 directory. I've also done an ARM 64-bit version of the software. There are now no dependencies on any serialization except protobuf. Same license conditions apply. John [email protected]
About
Crypto for educational use and cloudproxy
Resources
License
Security policy
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published