Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
07-07-2014, 10:26 AM
#1
Member
Registered: Mar 2009
Location: N.C.
Distribution: "gentoo|debian|arch"
Posts: 106
Rep:
NCrypt - unable to use Serpent (?)
Hi all,
I have been using ncrypt ( 0.5.5, 0.6.11, 0.7.0 ) with Rijndael/aes.
After en-/de-crypting using Serpent the contents of the file turns into garbage:
Code:
$ ncrypt -e -s -i NEWS -o NEWS.ncr
$ ncrypt -d -s -i NEWS.ncr -o NEWS.dec
$ md5sum NEWS*
2ca37b5f91a097415ab4a9cf35034039 NEWS
2ac5e53cdc14166e2106d2a319858337 NEWS.dec
b401ee66fd6e08091f36ea4a27dd916c NEWS.ncr
I tried to do the same on a 32bit box, same result. I also imported the key ( -k ) from a file... no difference.
Any ideas?
Mike
Last edited by paziulek; 07-07-2014 at 11:11 AM .
07-07-2014, 10:56 AM
#2
Member
Registered: Mar 2009
Location: N.C.
Distribution: "gentoo|debian|arch"
Posts: 106
Original Poster
Rep:
I did recompile 0.6.11 on a 32bit box ( statically ) and moved it to the 64bit... it en- & de-crypts properly...
I got no idea what is going on...
gcc on 64bit:
Quote:
$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.2/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.2/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.5.2/work/gcc-4.5.2/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.2 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.2 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.2/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.2/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --disable-lto --enable-nls --without-included-gettext --with-system-zlib --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --enable-cld --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.5.2/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.5.2 p1.1, pie-0.4.5'
Thread model: posix
gcc version 4.5.2 (Gentoo 4.5.2 p1.1, pie-0.4.5)
and 32:
Quote:
$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.4.3 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.3 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.3/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.3/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-nls --without-included-gettext --with-system-zlib --disable-werror --enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/i686-pc-linux-gnu/4.4.3/python --enable-checking=release --disable-libgcj --with-arch=i686 --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.3-r2 p1.2'
Thread model: posix
gcc version 4.4.3 (Gentoo 4.4.3-r2 p1.2)
Last edited by paziulek; 07-07-2014 at 10:59 AM .
07-07-2014, 11:01 AM
#3
Senior Member
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982
ncrypt was last updated in 2005. You may want to migrate to something else.
I can confirm that the ncrypt serpent implementation is broken. I suppose I could try to fix it, but it is better just to find another program.
1 members found this post helpful.
07-07-2014, 11:10 AM
#4
Member
Registered: Mar 2009
Location: N.C.
Distribution: "gentoo|debian|arch"
Posts: 106
Original Poster
Rep:
Quote:
Originally Posted by
metaschima
ncrypt was last updated in 2005. You may want to migrate to something else.
I can confirm that the ncrypt serpent implementation is broken. I suppose I could try to fix it, but it is better just to find another program.
Thank you very much!
I thought the system hardware is broken....
Well, the 32bit static works fine(if there is a need for that) - otherwise I will find an alternative...
Thanks again!
Mike
07-07-2014, 11:48 AM
#5
Senior Member
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982
I fixed it, but let me clean the code up a bit and I'll post the solution.
They used 'unsigned long' which is 4 bytes on 32-bit systems and 8-bytes on 64-bit systems. So, I removed all 'unsigned long' and replaced them with 'uint32_t' from the stdint.h standard library definition. This fixes the problem.
1 members found this post helpful.
07-07-2014, 12:37 PM
#6
Senior Member
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982
Ok, I attached a working version of ncrypt. Change the ending to '.txz' and extract it. It should compile and work now.
I couldn't fix all the type conversion warnings, but they're not serious.
1 members found this post helpful.
07-08-2014, 10:19 AM
#7
Member
Registered: Mar 2009
Location: N.C.
Distribution: "gentoo|debian|arch"
Posts: 106
Original Poster
Rep:
Quote:
Originally Posted by
metaschima
Ok, I attached a working version of ncrypt. Change the ending to '.txz' and extract it. It should compile and work now.
I couldn't fix all the type conversion warnings, but they're not serious.
Perfect! Thank you
metaschima !
EDIT:
There is one problem with the modified code: it does not accept passwords imported from a file...
ncrypt: unable to find a password in file ./a
Last edited by paziulek; 07-08-2014 at 10:38 AM .
All times are GMT -5. The time now is 09:04 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News