antonio1 | 2 May 2011 12:06
Picon
Favicon

Orthogonal codeword


Hi all.
 i'm searching for a cryptosystem that allow me to obtain codeword that are
mutually orthogonal. For example 

E(f,k)=g
E(y,k)=g'

and exist one function Z of two arguments such that:
Z(g,g')=0 

Such cryptosystem exists?
-- 
View this message in context: http://old.nabble.com/Orthogonal-codeword-tp31522217p31522217.html
Sent from the Crypto++ Users mailing list archive at Nabble.com.

--

-- 
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe <at> googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.

MMoadeli | 4 May 2011 14:17
Favicon

Crypto++ on Snow Lepord

Hi all,

It may sound an easy question for you, but took me over a week now,
and no success.
I am using a Mac running Snow Leopard OS X, on an Intel Core 2 Duo.  I
recently built gcc 4.6 on my machine as I need some features including
c++0x ones.
when I try to compile the cryptopp I get the following errors.
---------
cpu.h:53:no such instruction: `pclmulqdq $16, -64(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $0, -192(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $0, -80(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $16, -112(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $1, -144(%rbp),%xmm1'
cpu.h:53:no such instruction: `pclmulqdq $17, -208(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $0, -592(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $1, -656(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $0, -752(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $1, -864(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $1, -928(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $1, -1024(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $16, -1168(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $17, -1232(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $16, -1328(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $16, -1440(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $16, -1504(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $16, -1600(%rbp),%xmm0'
-------
I tried a few compiler directives including -m32, but all fail in
linking or compiling.
(Continue reading)

Jeffrey Walton | 5 May 2011 07:36
Picon

Re: Crypto++ on Snow Lepord


On May 4, 8:17 am, MMoadeli <mmoad... <at> maidsafe.net> wrote:
> Hi all,
>
> It may sound an easy question for you, but took me over a week now,
> and no success.
> I am using a Mac running Snow Leopard OS X, on an Intel Core 2 Duo.  I
> recently built gcc 4.6 on my machine as I need some features including
> c++0x ones.
> when I try to compile the cryptopp I get the following errors.
> ---------
> cpu.h:53:no such instruction: `pclmulqdq $16, -64(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $0, -192(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $0, -80(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $16, -112(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $1, -144(%rbp),%xmm1'
> cpu.h:53:no such instruction: `pclmulqdq $17, -208(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $0, -592(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $1, -656(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $0, -752(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $1, -864(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $1, -928(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $1, -1024(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $16, -1168(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $17, -1232(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $16, -1328(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $16, -1440(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $16, -1504(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $16, -1600(%rbp),%xmm0'
> -------
(Continue reading)

MMoadeli | 5 May 2011 15:31
Favicon

Re: Crypto++ on Snow Lepord

Hi Jeffery,

Many thanks for the reply.
With your advised compiler directives I got similar errors. I tried
both gcc-4.4 and gcc-4.6.
Actually, the errors are the result of compiling gcm.cpp. Following
are the errors generated as the result of using different compiler
directives.

---------------------------
1- Using advised directives

MyMacOSX>c++ -m64 -mtune=core2 -g3 -ggdb -DDEBUG -O0 -
DCRYPTOPP_DISABLE_ASM -pipe -c gcm.cpp

cpu.h:53:no such instruction: `pclmulqdq $16, -368(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $0, -224(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $0, -208(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $16, -160(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $1, -112(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $17, -32(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $0, -1344(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $1, -1264(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $0, -1152(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $1, -1024(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $1, -944(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $1, -832(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $16, -672(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $17, -592(%rbp),%xmm0'
cpu.h:53:no such instruction: `pclmulqdq $16, -480(%rbp),%xmm0'
(Continue reading)

MMoadeli | 5 May 2011 19:54
Favicon

Re: Crypto++ on Snow Lepord


Please note that I can compile cryptopp using gcc 4.2.1. However, as I
mentioned earlier I need it to be compiled with gcc4.4+

Cheers,
Moadeli

On May 5, 2:31 pm, MMoadeli <mmoad... <at> maidsafe.net> wrote:
> Hi Jeffery,
>
> Many thanks for the reply.
> With your advised compiler directives I got similar errors. I tried
> both gcc-4.4 and gcc-4.6.
> Actually, the errors are the result of compiling gcm.cpp. Following
> are the errors generated as the result of using different compiler
> directives.
>
> ---------------------------
> 1- Using advised directives
>
> MyMacOSX>c++ -m64 -mtune=core2 -g3 -ggdb -DDEBUG -O0 -
> DCRYPTOPP_DISABLE_ASM -pipe -c gcm.cpp
>
> cpu.h:53:no such instruction: `pclmulqdq $16, -368(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $0, -224(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $0, -208(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $16, -160(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $1, -112(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $17, -32(%rbp),%xmm0'
> cpu.h:53:no such instruction: `pclmulqdq $0, -1344(%rbp),%xmm0'
(Continue reading)

Jeffrey Walton | 5 May 2011 21:01
Picon

Re: Crypto++ on Snow Lepord


On May 5, 9:31 am, MMoadeli <mmoad... <at> maidsafe.net> wrote:
> Hi Jeffery,
>
> Many thanks for the reply.
> With your advised compiler directives I got similar errors. I tried
> both gcc-4.4 and gcc-4.6.
> Actually, the errors are the result of compiling gcm.cpp.
http://software.intel.com/en-us/articles/intel-carry-less-multiplication-instruction-and-its-usage-for-computing-the-gcm-mode/

> Following are the errors generated as the result of using different
> compiler directives.

You appear to be having problems with AESNI (correct me here if I am
wrong). AESNI is available on the newer Intel processors (i5, i7,
etc), but not Core 2 Duo. Open config.h, and add the following at the
end of the header. Note that it is not portable - its a one-off for
your situation.

# if defined(CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE)
# undef CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE
#endif

# define CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE 0

The idea is to skip the block starting at line 19 in cpu.h (see
http://cryptopp.svn.sourceforge.net/viewvc/cryptopp/trunk/c5/cpu.h?revision=527&view=markup).

I'm not sure why the version of GCC (4.5, 4.6) on Snow Leopard is
causing problems. I suspect it has to do with some Crypto++ defines
(Continue reading)

Jeffrey Walton | 6 May 2011 03:37
Picon

Re: RSA Encryption/Decryption


On Apr 25, 11:21 am, "Robert F." <rfrit... <at> phantomdev.net> wrote:
> Hello, I am trying to get RSA Encryption/Decryption working for my program.
> This is what I have so far:
>
> std::string xxz568::rsaEncrypt(const CryptoPP::Integer e, const
> CryptoPP::Integer n, std::string message) {
>    AutoSeededRandomPool rng;
>    std::string holder;
>
>    RSAES_OAEP_SHA_Encryptor enc;
>    enc.AccessKey().Initialize(n, e);
>
>    StringSource(message, true,
>       new PK_EncryptorFilter(rng, enc,
>              new HexEncoder(
>             new StringSink(holder), false
>                  )
>       ) // PK_EncryptorFilter
>    ); // StringSource
>    return holder;
>
> }
>
> std::string xxz568::RSADecrypt(const CryptoPP::Integer d, std::string
> message) {
>    AutoSeededRandomPool rng;
>    std::string holder;
>
>    RSAES_OAEP_SHA_Decryptor dec;
(Continue reading)

Jeffrey Walton | 6 May 2011 06:13
Picon

Re: Crypto++ on Snow Lepord


On May 5, 9:31 am, MMoadeli <mmoad... <at> maidsafe.net> wrote:
> Hi Jeffery,
>
> Many thanks for the reply.
> With your advised compiler directives I got similar errors. I tried
> both gcc-4.4 and gcc-4.6.
> Actually, the errors are the result of compiling gcm.cpp. Following
> are the errors generated as the result of using different compiler
> directives.
OK. I had a little more time to look at this.

According to Intel (perhaps GCC would be a better source???),
pclmulqdq is part of AVX and available in GCC 4.6, not GCC 4.4. See
http://software.intel.com/en-us/avx/ and
http://software.intel.com/en-us/articles/intel-software-development-emulator/.
Intel's Software Development Emulator page has a Q and A that makes it
clear.

GCC 4.6 begs the question, why "no such instruction"? That could be
either a header problem, or a cross-compile issue. I believe the
correct header is included, so I'm leaning towards a cross-compile
issue. I suspect the AVX test on the Core2 is failing (Core2 does not
have AVX), so the instruction is left undefined. See
http://old.nabble.com/PATCH:-Support-Intel-AVX-Programming-Reference-(January,-2009)-td21833586.html.

Jeff

> ---------------------------
> 1- Using advised directives
(Continue reading)

MMoadeli | 6 May 2011 18:30
Favicon

Re: Crypto++ on Snow Lepord

Hi Jeffrey,

Thanks for the help.
As you pointed out the problem was in using AESNI. Adding -
DCRYPTOPP_DISABLE_AESNI to directives was the solution.
By the way, I used experimental gcc 4.7 this time.

Kind regards,
Moadeli

On May 5, 8:01 pm, Jeffrey Walton <noloa... <at> gmail.com> wrote:
> On May 5, 9:31 am, MMoadeli <mmoad... <at> maidsafe.net> wrote:> Hi Jeffery,
>
> > Many thanks for the reply.
> > With your advised compiler directives I got similar errors. I tried
> > both gcc-4.4 and gcc-4.6.
> > Actually, the errors are the result of compiling gcm.cpp.
>
> http://software.intel.com/en-us/articles/intel-carry-less-multiplicat...
>
> > Following are the errors generated as the result of using different
> > compiler directives.
>
> You appear to be having problems with AESNI (correct me here if I am
> wrong). AESNI is available on the newer Intel processors (i5, i7,
> etc), but not Core 2 Duo. Open config.h, and add the following at the
> end of the header. Note that it is not portable - its a one-off for
> your situation.
>
> # if defined(CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE)
(Continue reading)

Leonardo Carreira | 9 May 2011 09:53
Picon

CMAC AES calculation with specified IV and Key

Hi Masters,

Actually in Cryptopp5.6.1 there's a class to handle CMAC calculation..
But, i found a problem when use it with IV initialization..
I've already tried to initialize the IV, but it seems didn't work.. :(
Could you help me to give me simple snippet code to handle CMAC
AES-128 calculation, specify the IV and random byte input data?
And can we get K0, K1 and K2 of our CMAC Key (when CMAC calculation
time)?

Actually, my classmate have already done this..
But i want to create my own application which does the same..

Here's the output of my classmate's tool : (CMAC AES-128 CBC)

* 1st step
IV  = 00000000000000000000000000000000
Key = 00000000000000000000000000000000
Input = 25
CMAC Result = F60AA29D615BC9C4C0A7C8A08D963DEF
=======================================================
* 2nd step
IV  = F60AA29D615BC9C4C0A7C8A08D963DEF
Key = 00000000000000000000000000000000
Input = 25
CMAC Result = 1368BD293F9DC7DF8019BF0A90E7A853
=======================================================
* 3rd step
IV  = F60AA29D615BC9C4C0A7C8A08D963DEF
Key = 00000000000000000000000000000000
(Continue reading)


Gmane