-
Notifications
You must be signed in to change notification settings - Fork 1
/
public.erl
91 lines (77 loc) · 2.42 KB
/
public.erl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% @author Carl-Johan Kjellander <[email protected]>
%%% @copyright Carl-Johan Kjellander 2011 GPL 3.0
%%%
%%% @doc Public part of the RSA Challenges 2011
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-module(public).
-export([chal/1
]).
%% @spec chal(BitLength::integer() -> {Ciphertext, Exponent, Modulus}
%% Ciphertext = integer()
%% Exponent = integer()
%% Modulus = integer()
%% @doc All RSA challenges encoded with 80 to 256 bits.
%% The Ciphertext, once decoded can be transformed to a string
%% with cth_rsa:int_decode(PlaintextInteger).
%% @end
chal(80) ->
{577083856964599403382997
, 65537
, 782656130558653165730327
};
chal(96) ->
{39896845542978700577155416795
, 65537
, 56321657515433825107950333413
};
chal(112) ->
{1574103759309292089578939179018322
, 65537
, 4297952193915096232821452592930599
};
chal(128) ->
{65570474677062968634146671304431229833
, 65537
, 152659829961464984162553093916104264833
};
chal(144) ->
{10772612431555264665908173899904587026457939
, 65537
, 13822457846072003208859266479785011676442459
};
chal(160) ->
{974962889304861357515004237896682328205953676115
, 65537
, 1337160781566467386212813593796062224686780249127
};
chal(176) ->
{52736739067155869462574569028566436231250406161195940
, 65537
, 54793821862696489917155883015209734751847212970909409
};
chal(192) ->
{70773177326929951739751449211931395552835343934322770194
, 65537
, 3499564596536965079646734639679432493015847775893365031413
};
chal(208) ->
{16454967173301819337634728487419782688207435119636107563750471
, 65537
, 294628198604572487496528591980933948825912234393306082857065147
};
chal(224) ->
{1228771944598107709227861511663674391888632703235775037791973747037
, 65537
, 14014480162382809932198863043565508079116242450832859585921574752577
};
chal(240) ->
{430616396972184190897559365742806722978931100199898050203113086614580729
, 65537
, 888579523529679238909313297612400713662521211619570709234911550795170117
};
chal(256) ->
{60603638652892039857945866246467462885119261791435721187671661722424304883501
, 65537
, 75878405933075456750178959460443572269008242052777902127314271331941529299329
}.