Skip to content

Releases: hardbyte/Paillier.jl

v0.3.1

07 Jan 02:03
f009030
Compare
Choose a tag to compare

Paillier v0.3.1

  • Encrypted objects are now shown without displaying the raw ciphertext
  • Update docs and fix all doctest examples (#19) (@hardbyte)

Diff since v0.3.0

v0.3.0

03 Jan 21:03
Compare
Choose a tag to compare

Paillier v0.3.0

Diff since v0.2.4

Closed issues:

  • Compat section missing from project file (#15)
  • Encoding should be a parametric type to allow multiple dispatch (#16)

Merged pull requests:

v0.3.0-a.2

03 Jan 06:32
Compare
Choose a tag to compare
v0.3.0-a.2 Pre-release
Pre-release

Introduces a breaking change in the encoded type, which should allow easier composition with other Julia modules.

To migrate replace Encoding(Float32, publickey) with Encoding{Float32}(publickey).

v0.3.0-alpha

03 Jan 00:35
Compare
Choose a tag to compare
v0.3.0-alpha Pre-release
Pre-release

Introduces a breaking change in the encoded type, which should allow easier composition with other Julia modules.

To migrate replace Encoding(Float32, publickey) with Encoding{Float32}(publickey).

Alpha release for testing

v0.2.4

15 Aug 11:41
5bc6421
Compare
Choose a tag to compare

Had an issue with the Julia package manager

v0.2.3

25 May 05:55
163e980
Compare
Choose a tag to compare
  • now use a single module global reference to the RandomDevice
  • Expanded documentation
  • A private set example
  • Examples are now tested.
  • Testing now carried out by travis

v0.2.2

09 Jan 12:20
79b94c0
Compare
Choose a tag to compare

Now efficiently supporting arrays of encrypted floating point numbers.

julia> publickey, privatekey = generate_paillier_keypair(2048)
julia> a = [0.0, 1.2e3, 3.14, π]
julia> encoding = Encoding(Float32, publickey)
julia> enca = encode_and_encrypt(a, encoding);
julia> decrypt_and_decode(privatekey, enca)
4-element Array{Float32,1}:
    0.0      
 1200.0      
    3.1399999
    3.1415927
julia> encb = 2 * enca;
julia> decrypt_and_decode(privatekey, encb)
4-element Array{Float32,1}:
    0.0      
 2400.0      
    6.2799997
    6.2831855
julia> decrypt_and_decode(privatekey, reduce(+, encb))
2412.5632f0

v0.2.1

06 Jan 12:17
69ede0e
Compare
Choose a tag to compare

Support multiplication of EncryptedNumbers.

Other minor changes:

  • Better representation of public keys. e.g. PublicKey(bits=1024, hash=12389180309762011382)
  • More documentation around encoding.
  • Working on handling corner cases for encoding large numbers into a small cipherspace etc.

v0.2.0

06 Jan 06:53
6114988
Compare
Choose a tag to compare

New features

Added an encoding system that supports julia's floating point types:

julia> keysize = 2048
julia> publickey, privatekey = generate_paillier_keypair(keysize)
julia> encoding = Encoding(Float32, publickey)
julia> a = Float32(π)
julia> b = 100
julia> enc1 = encode_and_encrypt(a, encoding)
julia> decrypt_and_decode(privatekey, enc1)
3.1415927f0
julia> enc1.exponent
-6
julia> enc2 = encode_and_encrypt(b, encoding)
julia> enc3 = decrypt_and_decode(privatekey, enc1 + enc2)
julia> enc3
103.141594f0
julia> decrypt_and_decode(privatekey, enc1 - 20.0)
-16.858408f0

The raw cryptosystem has had some modifications too.

  • Keys are now represented on the command line nicer.
  • Almost everything has been documented.

Known issues/TODO

  • Still need to add support for multiplication of encoded numbers.
  • The EncryptedArrays still all work but don't help with encoded numbers yet.

First cut - v0.1.1

28 Dec 06:56
ce6944f
Compare
Choose a tag to compare

WARNING

First very rough release - Don't use for anything serious yet! Not reviewed by a cryptographer.

In particular note that I don't obfuscate the results of encrypted math operations by default. This is an
optimization copied from python-paillier, however after any homomorphic operation - before sharing an EncryptedNumber or EncryptedArray you must call obfuscate() to secure the ciphertext.

Ideally this will occur behind the scenes at serialization time.

Quick Example

julia> using Paillier
julia> pub, priv = generate_paillier_keypair(1024)
julia> a = encrypt(pub, 10)
julia> b = encrypt(pub, 50)
julia> decrypt(priv, a)
10
julia> decrypt(priv, a + 5)
15
julia> # obfuscate before sharing an encrypted number:
julia> c = obfuscate(2a + b);
julia> typeof(c)
EncryptedNumber
julia> decrypt(priv, c)
70

Array Support

To avoid wasting space having multiple copies of the same PublicKey I've added an
EncryptedArray type that shares one public key for an array of ciphertexts.

julia> a = [0,1,2,3,4,5]
julia> enca = encrypt(publickey, a)
julia> encb = 2 * enca
julia> decrypt(privatekey, reduce(+, encb))
30