Beispiel #1
0
 def test_basic(self):
     group = schnorr.verdict_1024()
     self.basic(group)
Beispiel #2
0
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
from Crypto.Util import Counter
from Crypto.Util.number import long_to_bytes, bytes_to_long

import verdict

from cells.null import NullDecoder, NullEncoder
from certify.encrypted_exchange import EncryptedAccumulator, EncryptedCertifier
from certify.null import NullAccumulator, NullCertifier
from certify.signature import SignatureAccumulator, SignatureCertifier

from elgamal import PublicKey, PrivateKey
import schnorr

global_group = schnorr.verdict_1024()

cell_length = 24
empty_cell = bytes(0 for x in range(cell_length))

class XorNet:
    def __init__(self, secrets, interval):
        self.secrets = secrets
        self.interval = interval
        self.cell_count = {}

    def produce_ciphertext(self, nym_idx):
        if nym_idx not in self.cell_count:
            self.cell_count[nym_idx] = 0

        ciphertext = bytes(0 for x in range(cell_length))
Beispiel #3
0
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
from Crypto.Util import Counter
from Crypto.Util.number import long_to_bytes, bytes_to_long

import verdict

from cells.null import NullDecoder, NullEncoder
from certify.encrypted import EncryptedAccumulator, EncryptedCertifier
from certify.null import NullAccumulator, NullCertifier
from certify.signature import SignatureAccumulator, SignatureCertifier

from elgamal import PublicKey, PrivateKey
import schnorr

global_group = schnorr.verdict_1024()

cell_length = 24
empty_cell = bytes(0 for x in range(cell_length))


class XorNet:
    def __init__(self, secrets, interval):
        self.secrets = secrets
        self.interval = interval
        self.cell_count = {}

    def produce_ciphertext(self, nym_idx):
        if nym_idx not in self.cell_count:
            self.cell_count[nym_idx] = 0
Beispiel #4
0
 def test_basic(self):
     group = schnorr.verdict_1024()
     self.basic(group)