GithubHelp home page GithubHelp logo

exaexa / codecrypt Goto Github PK

View Code? Open in Web Editor NEW
305.0 305.0 41.0 19.71 MB

Post-quantum cryptography tool (THIS REPOSITORY IS ONLY A MIRROR OF THE MAIN ONE, PLEASE DO NOT FILE BUGS HERE)

Home Page: https://gitea.blesmrt.net/exa/codecrypt

License: GNU Lesser General Public License v3.0

CMake 0.76% Makefile 0.43% Shell 0.32% M4 0.76% C++ 96.99% C 0.75%

codecrypt's People

Contributors

amynka avatar biergaizi avatar exaexa avatar infinity0 avatar mapmeld avatar tearsofphoenix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codecrypt's Issues

A Question regarding HWRNG

Can we use a HWRNG that seeds directly to /dev/random like OneRNG with Codecrypt. Suppose if the user wants to add the support of an external TRNG with Codecrypt .

linkage to the pthread library

When trying to compile codecrypt, i recieved the following errors:

/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../lib/libcryptopp.so: undefined reference to `pthread_key_create'
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../lib/libcryptopp.so: undefined reference to `pthread_getspecific'
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../lib/libcryptopp.so: undefined reference to `pthread_key_delete'
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../lib/libcryptopp.so: undefined reference to `pthread_setspecific'

Simply adding "-lpthread" to the linker flags in "autogen.sh" solves this.

Key Generating

Hey, I am using th is code on my 64 bit ubuntu system. This command
ccr -g sig --name "John Deo"
It does not showing anything.I waited for two but keys are not generated. It is not ending.
Please help me in this issue.

Use LGPL v2.1 instead of v3 for better license compatibility

If you want to facilitate inclusion in other software, I think LGPL v2.1 is a much better choice, as LGPL v3 code can not be included in GPL v2 code (though it can be included in proprietary software), but LGPL v2.1 code can be included in both GPL v2 and v3 code.

See the GNU license compatibility chart.

If you want to switch, three people need to agree to re-licensing their contributions under the LGPL v2.1:

Entropy ?

Where does your program collect the required entropy to generate the key from ( /dev/random) ? Is there any possibility to include an external source of entropy to generate the keys ?

Compile issue on macOS

When trying to compile codecrypt on macOs (Darwin Kernel Version 17.3.0), Xcode Version 8.2 (8C38), the last step in building ccr fails:

make distclean; ./configure CPPFLAGS="-I/usr/include -I/opt/local/include" LDFLAGS="-L/usr/lib -L/opt/local/lib" CRYPTOPP_CFLAGS="-I/opt/local/include" CRYPTOPP_LIBS="/opt/local/lib" && make

[...]

  CXX      src//ccr-actions.o
  CXXLD    ccr
ld: can't map file, errno=22 file '/opt/local/lib' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ccr] Error 1

Adding -v to CPPFLAGS produces:

  CXX      src//ccr-actions.o
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin17.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.13.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name actions.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu penryn -target-linker-version 274.2 -v -dwarf-column-info -debugger-tuning=lldb -coverage-file /Users/u0022o6/codecrypt-1.8/src//ccr-actions.o -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0 -dependency-file src/.deps/ccr-actions.Tpo -sys-header-deps -MP -MT src//ccr-actions.o -D "PACKAGE_NAME=\"codecrypt\"" -D "PACKAGE_TARNAME=\"codecrypt\"" -D "PACKAGE_VERSION=\"1.8\"" -D "PACKAGE_STRING=\"codecrypt 1.8\"" -D "PACKAGE_BUGREPORT=\"\"" -D "PACKAGE_URL=\"\"" -D "PACKAGE=\"codecrypt\"" -D "VERSION=\"1.8\"" -D STDC_HEADERS=1 -D HAVE_SYS_TYPES_H=1 -D HAVE_SYS_STAT_H=1 -D HAVE_STDLIB_H=1 -D HAVE_STRING_H=1 -D HAVE_MEMORY_H=1 -D HAVE_STRINGS_H=1 -D HAVE_INTTYPES_H=1 -D HAVE_STDINT_H=1 -D HAVE_UNISTD_H=1 -D HAVE_DLFCN_H=1 -D "LT_OBJDIR=\".libs/\"" -D HAVE_GMP_H=1 -D HAVE_LIBGMP=1 -D HAVE_FFTW3_H=1 -D HAVE_LIBFFTW3=1 -D CRYPTOPP_DIR_PLUS=0 -D HAVE_CRYPTOPP=1 -D HAVE_READPASSPHRASE=1 -D HAVE_MEMSET=1 -D HAVE_MKDIR=1 -D HAVE_FCNTL_H=1 -D HAVE_INTTYPES_H=1 -D HAVE_STDDEF_H=1 -D HAVE_STDLIB_H=1 -D HAVE_STRING_H=1 -D HAVE_SYS_FILE_H=1 -D HAVE_UNISTD_H=1 -D HAVE__BOOL=1 -I . -I .// -I /usr/local/include -I /usr/include -I /opt/local/include -stdlib=libc++ -Wall -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/u0022o6/codecrypt-1.8 -ferror-limit 19 -fmessage-length 166 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.13.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o src//ccr-actions.o -x c++ src//actions.cpp
clang -cc1 version 8.0.0 (clang-800.0.42.1) default target x86_64-apple-darwin17.3.0
ignoring nonexistent directory "/usr/include/c++/v1"
ignoring duplicate directory "."
ignoring duplicate directory "/usr/local/include"
  as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "/usr/include"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 .
 /opt/local/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1
 /usr/local/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
  CXXLD    ccr
ld: can't map file, errno=22 file '/opt/local/lib' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ccr] Error 1

Any idea on how to solve this is much appreciated. libcrypto++, fftw3, etc were installed using macports.

Sencode Parse Error with importing and exporting pubkeys

I built ccr off of HEAD, currently commit dae56da. I am using Sabayon Linux.

I generated a signature and encryption key, similar to how the readme instructed me to:

ccr -g fmtseq128-sha --name "John Doe"
ccr -g mceqd128fo-sha --name "John Doe"

Then I exported my public keys:

ccr -p -a -o my_pubkeys.asc -F Doe

I switched to another user on the same system, and attempted to import that file:

ccr --import < /tmp/my_pubkeys.asc

However, I got the error: "error: could not parse input sencode"

You can find a copy of my_pubkeys.asc here: https://ezcrypt.it/dJ7n#4Exyj1XWxUjTb1fwGDAfQIO9

Speculation

It looks like the error is spawning from actions.cpp line 1035. Looking at sencode_decode in sencode.cpp, I was able to get a rough idea of the format of these files.

I passed my_pubkeys.asc through a base64 decoder, and started manually decoding the format based on what sencode_decode is doing. At character offset 30 (immediately following my name), there should be an "s" to signal that there is a string following. However, the s is missing, and the encoder continues with writing the string anyway. This makes me believe that this is a bug with the encoder.

I tried looking into keyring::serialize_pubkeys in keyring.cpp (which I believe is the origin of the encoding logic), but I got a bit lost, which is why this ticket exists.

Secret key protection

Mirek,
Which symmetric key algorithm ( AES , XSalsa20 ... ) is used to protect the private key generated in Codecrypt , if at all ?

how to import key

signature key, encryption key and export of pubkeys is working by using below command :
ccr -g sig --name "John Doe" # your signature key
ccr -g enc --name "John Doe" # your encryption key
ccr -p -a -o my_pubkeys.asc -F Doe # export your pubkeys for friends

but i didn't understand how to import key.i tried to use given example but i failed to do that. please suggest .

Windows 8.1 Download

Hello,
I want to try codecrypt but I was wondering when will there be a download for Windows?

Keep getting requires Crypto++, already installed

Hi, I just reinstalled my linux box and notice that Im unable to re-install ccr 1.4 . I keep getting an error that I need crypto++ but it is installed. The sha.h is located in /usr/include/crypto++/sha.h. Not sure If anyone can help but it is preventing me from installing. I downloaded the ccr package from http://e-x-a.org/codecrypt/files/ .

I installed all of the below packages.
libcrypto++-doc
libcrypto++-utils
libcrypto++9
libcrypto++9-dbg
libcrypto++-dev

Distributor ID: Debian
Description: Debian GNU/Linux 7.1 (wheezy)
Release: 7.1
Codename: wheezy

This is the ./configure error I keep getting.
checking crypto++/sha.h usability... no
checking crypto++/sha.h presence... no
checking for crypto++/sha.h... no
configure: error: Codecrypt requires Crypto++

AES

I would like to respectfully request that support for AES256 in counter mode be added.

How to encrypt text with a private key?

I have done these:
ccr -g help
ccr -g fmtseq128-sha --name "John Doe" # your signature key
ccr -g mceqd128 --name "John Doe" # your encryption key
ccr -p -a -o my_pubkeys.asc -F Doe # export your pubkeys for friends

Now I want to encrypt the message "hello" with John Dow private key.
I am trying :
ccr --user "John Doe" -e "hello"
ccr --user John Doe -e "hello"
but it doesnt work.
Am I missing something obvious?

Why ARCFOUR/RC4?

Are plans for using Blowfish/AES/Serpent? Preferably serpent?

[REJECTED] Windows binary

Dear Mirek,
Could you be so kind to generate .exe for the rest of us who are mere Windows users w/o compiler?

Does codecrypt also provides security regarding classical computer attacks?

I know codecrypt aims to provide post-quantum security.

  1. Does this mean that codecrypt also provides security against classical computer attacks?

  2. I mean, if I use codecrypt, is it wise to also use PGP encryption on top of codecrypt's encryption?

  3. As a side note for the future, I'm worried about nanocomputing performance could easily break classical computer encryption (and nobody talks about it) and would also like to know if codecrypts encryption would cater this type of attacks.

crypto++ header location

The crypto++ headers are placed in the folder "/include/cryptopp" (at least the make script of crypto++ and arch linux place it at that directory). The codecrypt currently assumes it to be in the folder "/include/crypto++".

how to send message and mdpc code

sir, i have done key generation by using given command:
ccr -g sig --name "John Doe" # your signature key
ccr -g enc --name "John Doe" # your encryption key
but i didn't understand how to send message to anyone(i saw the example command but didn't understand)

also, i saw in pull request that mdpc code is given.can we implement mdpc code in codecrypt?

Mac OSX install instructions

Using Homebrew

  • brew install libtool libcryptopp fftw
  • replace libtoolize in autogen.sh with glibtoolize
  • ./autogen.sh
  • ./configure --with-cryptopp=/usr/local/Cellar/cryptopp/5.6.4/lib/
  • make
  • make install

Ubuntu Install Problem

Hi,

I have already installed crypto++ (by $make, $make check, $make install). However, I have met a problem when ./configure.

Here is the error message.

./configure: line 16279: syntax error near unexpected token CRYPTOPP,libcrypto++' ./configure: line 16279: PKG_CHECK_MODULES(CRYPTOPP,libcrypto++)'

Do you have any idea about it? My Ubuntu version is 16.04.3 LTS.

Inclusion in Debian

Please submit your packages for inclusion in Debian repos. I would like to see your program in the next stable release so our project can take advantage of it.

Related: Do you host a stand-alone repo we can document installation from? Please consider adding 32-bit packages.

Public key size?

First of all, let me say that codecrypt is great and I couldn't be more impressed. Thank you for creating it!

I noticed that the public keys generated (even the largest with the "enc-strongest" option) seem to be much smaller in size than I thought they would be for McEliece. For example, Wiki says at https://en.wikipedia.org/wiki/McEliece_cryptosystem that the keys would be around 512kbit. Could anyone please help me see what I'm misunderstanding?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.