semvec/pypi-packages huggingface dataset:
rens-paillier 1.2.1
Paillier encryption
License: MIT
Requires Python: >=3.8

# Paillier encryption

`python3.8` package for [Paillier encryption](https://en.wikipedia.org/wiki/Paillier_cryptosystem).

### Example usage

#### Setup
    from paillier.keygen import generate_keys
    from paillier.crypto import encrypt, decrypt

    pk, sk = generate_keys()

#### Basic encryption and decryption
    m1 = 45336
    ciphertext = encrypt(pk, m1)
    assert m1 == decrypt(pk, sk, ciphertext)

#### Homomorphic things
    from paillier.crypto import secure_addition, scalar_multiplication, secure_subtraction

    n, _ = pk
    m2 = 30381

    # Secure addition
    e1 = encrypt(pk, m1)
    e2 = encrypt(pk, m2)
    addition = secure_addition(e1, e2, n)
    assert m1 + m2 == decrypt(pk, sk, addition)

    # Scalar multiplication
    k = 23  # some scalar
    e1 = encrypt(pk, m1)
    multiplied = scalar_multiplication(e1, k, n)
    assert (m1 * k) % n == decrypt(pk, sk, multiplied)

    # Secure subtraction
    assert m1 > m2, "m2 should be bigger than m1 in order to subtract m2 from m1"
    e1 = encrypt(pk, m1)
    e2 = encrypt(pk, m2)
    subtracted = secure_subtraction(e1, e2, n)
    assert m1 - m2 == decrypt(pk, sk, subtracted)
isEven 0.1.0
Simple library to check if a number is even
License: MIT
Keywords: Even,Integer,Math

# isEven

isEven is a simple library to check if a number is even.

### Installation

```
pip install isEven
```

### Usage

```
from isEven import isEven

print(isEven('1')) //=> False
print(isEven('5')) //=> False

print(isEven(0)) //=> True
print(isEven(4)) //=> True
```
isOdd 0.1.2
Simple library to check if a number is odd
License: MIT
Keywords: Odd,Integer,Math

# isOdd

isOdd is a simple library to check if a number is odd.

### Installation

```
pip install isOdd
```

### Usage

```
from isOdd import isOdd

print(isOdd('1')) //=> true
print(isOdd('5')) //=> true

print(isOdd(0)) //=> false
print(isOdd(4)) //=> false
```
rens-eqt 1.5.1
Secure Equality Testing
License: MIT
Requires Python: >=3.8

# Secure Equality Testing

`python3.8` package for secure equality testing, implementation of the EQT-1 protocol of [this paper](https://dl.acm.org/doi/10.1145/3230833.3230866)

### Example usage

With predetermined `a` and `b`


    from eqt.protocol import Protocol

    p = Protocol(a=12313, b=12312, kappa=40)
    p.start()
    print(p.decrypted_result)

    p = Protocol(a=12313, b=12313, kappa=40)
    p.start()
    print(p.decrypted_result)


Using `a` and `b` as input

    from eqt.main import main
    main()

To see timing results

    from eqt.timing import timing
    timing()