Re: [viff-devel] Homomorphic encryption

2009-08-10 Thread Janus Dam Nielsen

Hi Marc

I am back from vacation and looking forward to the next release. Have  
you tried to replace the current uses of Paillier in VIFF with your  
code?




On 03/08/2009, at 11.11, Marc Makkes wrote:


Hi Janus,

The inclusion of multiple gmp.h and time.h is indeed a sloppy. This  
will
fixed in the next release. I'm currently working on there key  
generation

and some additional speedup. I hope to release it at the end of the
week. In addition I have some for key extraction and recomputing
methods. This make key storage a little easier. If you have any other
comments/suggestions please let me know.

Kind regards,

-Marc



Wed, Jul 29, 2009 at 01:42:09PM +0200, Janus Dam Nielsen wrote:

  Hi Marc

  I have successfully compiled and run test.py and time.sh.

  The results where:

  [fagid...@fiona:~/./PyPaillier]$ ./time.sh
  Encrypting:
  10 loops, best of 3: 132 msec per loop
  Decrypting
  10 loops, best of 3: 39.2 msec per loop
  Nice indeed.

  I have some minor comments:

  In py_paillier.c you import sys/time.h twice.

  Also you include gmp.h in a lot of places, both in .c and .h  
files is

  that necessary.

  On 10/07/2009, at 10.18, Marc Makkes wrote:

  Hi Janus,
  Attached you find the tarball.
  Kind regards,
  -Marc
  PyPaillier.tar.gz

  
  Janus Dam Nielsen
  RD SCIENTIST, PhD.
  CENTRE FOR IT-SECURITY
  THE ALEXANDRA INSTITUTE LTD.
  T +45 42 22 93 56
  E [1]janus.niel...@alexandra.dk
  W alexandra.dk
  

References

  1. mailto:janus.niel...@alexandra.dk






Janus Dam Nielsen

RD SCIENTIST, PhD.
CENTRE FOR IT-SECURITY

THE ALEXANDRA INSTITUTE LTD.

T +45 42 22 93 56
E janus.niel...@alexandra.dk
W alexandra.dk


___
viff-devel mailing list (http://viff.dk/)
viff-devel@viff.dk
http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk


Re: [viff-devel] Homomorphic encryption

2009-07-10 Thread Janus Dam Nielsen

Hi Marc,

Thank you for your email.

I will have a look at the code, when I get back from vacation two  
weeks from now.



On 10/07/2009, at 10.18, Marc Makkes wrote:


Hi Janus,

I think that I'd have reached the stage where you can test my code,  
but

still lacks some basic checks and is still prone to timing attacks and
is basically the same viffs current implementation, with some  
additional
speedups. So consequently, it code should only be used for testing  
purposes

only.

I'm achieving the following speeds on my atom N270 ( 1.6Ghz ) testing
with key sizes of 2048 bit.

Viff code:
--
Encrypting:
10 loops, best of 3: 4.42 sec per loop
Decrypting:
10 loops, best of 3: 925 msec per loop

My code:

Encrypting:
10 loops, best of 3: 496 msec per loop
Decrypting:
10 loops, best of 3: 143 msec per loop

For encrypting its almost a 9 fold speedup and for decrypting 6.5  
times

with respect to the current implementation.

In the tar ball you find the small makefile as well as a test.py file.
It shows the basic use of all functions. If you have any comments,  
issues

or questions please let me know.

Happy testing,

-Marc




Janus Dam Nielsen

RD SCIENTIST, PhD.
CENTRE FOR IT-SECURITY

THE ALEXANDRA INSTITUTE LTD.

T +45 42 22 93 56
E janus.niel...@alexandra.dk
W alexandra.dk


___
viff-devel mailing list (http://viff.dk/)
viff-devel@viff.dk
http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk


Re: [viff-devel] Homomorphic encryption

2009-07-10 Thread Claudio Orlandi
Hi Marc,

Let me see if I understood the way you measured: it takes 496 msec on
average to do an encryption with your code, right?

Claudio

On Fri, Jul 10, 2009 at 10:18 AM, Marc Makkesmmak...@science.uva.nl wrote:
 Hi Janus,

 I think that I'd have reached the stage where you can test my code, but
 still lacks some basic checks and is still prone to timing attacks and
 is basically the same viffs current implementation, with some additional
 speedups. So consequently, it code should only be used for testing purposes
 only.

 I'm achieving the following speeds on my atom N270 ( 1.6Ghz ) testing
 with key sizes of 2048 bit.

 Viff code:
 --
 Encrypting:
 10 loops, best of 3: 4.42 sec per loop
 Decrypting:
 10 loops, best of 3: 925 msec per loop

 My code:
 
 Encrypting:
 10 loops, best of 3: 496 msec per loop
 Decrypting:
 10 loops, best of 3: 143 msec per loop

 For encrypting its almost a 9 fold speedup and for decrypting 6.5 times
 with respect to the current implementation.

 In the tar ball you find the small makefile as well as a test.py file.
 It shows the basic use of all functions. If you have any comments, issues
 or questions please let me know.

 Happy testing,

 -Marc

 ___
 viff-devel mailing list (http://viff.dk/)
 viff-devel@viff.dk
 http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk





-- 
Claudio Orlandi

PhD student,
Department of Computer Science, Turing-223
Aarhus Universitet, Denmark
http://www.daimi.au.dk/~orlandi
___
viff-devel mailing list (http://viff.dk/)
viff-devel@viff.dk
http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk


Re: [viff-devel] Homomorphic encryption

2009-07-10 Thread Marc X. Makkes
Hi Claudio,

Yes, It takes 496 msec on my machine. For timing i used the following:

python -m timeit -s 'from pypaillier import generate_keys, encrypt' \
   -s 'pk, sk = generate_keys(2048)' \
   -s 'm = 98723498' \
   'encrypt(m, pk)'

python -m timeit -s 'from pypaillier import generate_keys, encrypt, decrypt' \
   -s 'pk, sk = generate_keys(2048)' \
   -s 'm = 98723498' \
   -s 'c = encrypt(m, pk)' \
   'decrypt(c, sk)'

Kind regards, 

-Marc



On Fri, Jul 10, 2009 at 03:04:44PM +0200, Claudio Orlandi wrote:
 Hi Marc,
 
 Let me see if I understood the way you measured: it takes 496 msec on
 average to do an encryption with your code, right?
 
 Claudio
 
 On Fri, Jul 10, 2009 at 10:18 AM, Marc Makkesmmak...@science.uva.nl wrote:
  Hi Janus,
 
  I think that I'd have reached the stage where you can test my code, but
  still lacks some basic checks and is still prone to timing attacks and
  is basically the same viffs current implementation, with some additional
  speedups. So consequently, it code should only be used for testing purposes
  only.
 
  I'm achieving the following speeds on my atom N270 ( 1.6Ghz ) testing
  with key sizes of 2048 bit.
 
  Viff code:
  --
  Encrypting:
  10 loops, best of 3: 4.42 sec per loop
  Decrypting:
  10 loops, best of 3: 925 msec per loop
 
  My code:
  
  Encrypting:
  10 loops, best of 3: 496 msec per loop
  Decrypting:
  10 loops, best of 3: 143 msec per loop
 
  For encrypting its almost a 9 fold speedup and for decrypting 6.5 times
  with respect to the current implementation.
 
  In the tar ball you find the small makefile as well as a test.py file.
  It shows the basic use of all functions. If you have any comments, issues
  or questions please let me know.
 
  Happy testing,
 
  -Marc
 
  ___
  viff-devel mailing list (http://viff.dk/)
  viff-devel@viff.dk
  http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk
 
 
 
 
 
 -- 
 Claudio Orlandi
 
 PhD student,
 Department of Computer Science, Turing-223
 Aarhus Universitet, Denmark
 http://www.daimi.au.dk/~orlandi

-- 
If this email is PGP signed, the fingerprint is: 
C6D2 B5D7 390E 0D4E DE02  460E DC7F 651E A9CB 1B34 
signed with a 521-bit ECC key 



pgpQsWCHtA4MH.pgp
Description: PGP signature
___
viff-devel mailing list (http://viff.dk/)
viff-devel@viff.dk
http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk