Skip to content

Commit

Permalink
added keygenerator without any params
Browse files Browse the repository at this point in the history
  • Loading branch information
benadida committed Jan 9, 2009
1 parent 10759e8 commit bbd582b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions helios/urls.py
Expand Up @@ -29,6 +29,7 @@

# election
(r'^elections/params$', election_params),
(r'^elections/keygenerator$', election_keygenerator),
(r'^elections/verifier$', election_verifier),
(r'^elections/single_ballot_verifier$', election_single_ballot_verifier),
(r'^elections/api$', election_js_api),
Expand Down
14 changes: 14 additions & 0 deletions helios/views.py
Expand Up @@ -23,6 +23,12 @@
ELGAMAL_PARAMS.q = 84994859890970497967519795478043416964835366675666942513039608763468873083395467255309470036953257214704957185036086983891099064711779112427095660458664710435263443902008855527538958003748402024603362784478305257699598424310826953989290106608761198529035521751702350134212875361313132604049928203653263506381L
ELGAMAL_PARAMS.g = 68111451286792593845145063691659993410221812806874234365854504719057401858372594942893291581957322023471947260828209362467690671421429979048643907159864269436501403220400197614308904460547529574693875218662505553938682573554719632491024304637643868603338114042760529545510633271426088675581644231528918421974L

# trying new ones from OlivierP
ELGAMAL_PARAMS.p = 16328632084933010002384055033805457329601614771185955389739167309086214800406465799038583634953752941675645562182498120750264980492381375579367675648771293800310370964745767014243638518442553823973482995267304044326777047662957480269391322789378384619428596446446984694306187644767462460965622580087564339212631775817895958409016676398975671266179637898557687317076177218843233150695157881061257053019133078545928983562221396313169622475509818442661047018436264806901023966236718367204710755935899013750306107738002364137917426595737403871114187750804346564731250609196846638183903982387884578266136503697493474682071L
ELGAMAL_PARAMS.q = 61329566248342901292543872769978950870633559608669337131139375508370458778917L
ELGAMAL_PARAMS.g = 14887492224963187634282421537186040801304008017743492304481737382571933937568724473847106029915040150784031882206090286938661464458896494215273989547889201144857352611058572236578734319505128042602372864570426550855201448111746579871811249114781674309062693442442368697449970648232621880001709535143047913661432883287150003429802392229361583608686643243349727791976247247948618930423866180410558458272606627111270040091203073580238905303994472202930783207472394578498507764703191288249547659899997131166130259700604433891232298182348403175947450284433411265966789131024573629546048637848902243503970966798589660808533L



def test(request):
str = ["%s : %s\n" % (k,request.META[k]) for k in request.META.keys()]
Expand Down Expand Up @@ -79,6 +85,14 @@ def election_single_ballot_verifier(request):

def election_js_api(request):
return render_template(request, "js_api")

def election_keygenerator(request):
"""
A key generator with the current params, like the trustee home but without a specific election.
"""
eg_params_json = utils.to_json(ELGAMAL_PARAMS.toJSONDict())
return render_template(request, "election_keygenerator", {'eg_params_json': eg_params_json})


@login_required
def election_new(request):
Expand Down

0 comments on commit bbd582b

Please sign in to comment.