Skip to content
Snippets Groups Projects
Select Git revision
  • 6d9dc07126b9e40f799e012582fc8b38251f0c96
  • master default protected
  • set-sast-config-1
  • v2.2.3
  • v2.2.2
  • v1.4.0
  • v1.3.0
  • v1.2.1
  • v1.2.0
  • v1.1.2
  • v1.1.1
11 results

webpack.config.js

Blame
  • helios_trustee_decrypt.py 1022 B
    """
    decrypt elections where Helios is trustee
    
    DEPRECATED
    
    Ben Adida
    ben@adida.net
    2010-05-22
    """
    
    from django.core.management.base import BaseCommand
    
    from helios.models import Trustee
    
    
    class Command(BaseCommand):
        args = ''
        help = 'decrypt elections where helios is the trustee'
        
        def handle(self, *args, **options):
            # query for elections where decryption is ready to go and Helios is the trustee
            active_helios_trustees = Trustee.objects.exclude(secret_key = None).exclude(election__encrypted_tally = None).filter(decryption_factors = None)
    
            # for each one, do the decryption
            for t in active_helios_trustees:
                tally = t.election.encrypted_tally
    
                # FIXME: this should probably be in the encrypted_tally getter
                tally.init_election(t.election)
    
                factors, proof = tally.decryption_factors_and_proofs(t.secret_key)
                t.decryption_factors = factors
                t.decryption_proofs = proof
                t.save()