1 /*
2   Copyright (C) 2006-2013 Werner Dittmann
3 
4   This program is free software: you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as published by
6   the Free Software Foundation, either version 3 of the License, or
7   (at your option) any later version.
8 
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   GNU General Public License for more details.
13 
14   You should have received a copy of the GNU General Public License
15   along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 /*
19  * Authors: Werner Dittmann <Werner.Dittmann@t-online.de>
20  */
21 //                             1
22 //                    1234567890123456
23 char clientId[] =    "GNU ZRTP 4.6.4  "; // 16 chars max.
24 char zrtpVersion_11[] = "1.10";          // must be 4 chars
25 char zrtpVersion_12[] = "1.20";          // must be 4 chars
26 /**
27  *
28  */
29 char HelloMsg[]    = "Hello   ";
30 char HelloAckMsg[] = "HelloACK";
31 char CommitMsg[]   = "Commit  ";
32 char DHPart1Msg[]  = "DHPart1 ";
33 char DHPart2Msg[]  = "DHPart2 ";
34 char Confirm1Msg[] = "Confirm1";
35 char Confirm2Msg[] = "Confirm2";
36 char Conf2AckMsg[] = "Conf2ACK";
37 char ErrorMsg[]    = "Error   ";
38 char ErrorAckMsg[] = "ErrorACK";
39 char GoClearMsg[]  = "GoClear ";
40 char ClearAckMsg[] = "ClearACK";
41 char PingMsg[]     = "Ping    ";
42 char PingAckMsg[]  = "PingACK ";
43 char SasRelayMsg[] = "SASrelay";
44 char RelayAckMsg[] = "RelayACK";
45 
46 char responder[]      = "Responder";
47 char initiator[]      = "Initiator";
48 char iniMasterKey[]   = "Initiator SRTP master key";
49 char iniMasterSalt[]  = "Initiator SRTP master salt";
50 char respMasterKey[]  = "Responder SRTP master key";
51 char respMasterSalt[] = "Responder SRTP master salt";
52 
53 char iniHmacKey[]  = "Initiator HMAC key";
54 char respHmacKey[] = "Responder HMAC key";
55 char retainedSec[] = "retained secret";
56 
57 char iniZrtpKey[]  = "Initiator ZRTP key";
58 char respZrtpKey[] = "Responder ZRTP key";
59 
60 char sasString[] = "SAS";
61 
62 char KDFString[] = "ZRTP-HMAC-KDF";
63 
64 char zrtpSessionKey[] = "ZRTP Session Key";
65 char zrtpExportedKey[] = "Exported key";
66 
67 char zrtpMsk[] = "ZRTP MSK";
68 char zrtpTrustedMitm[] = "Trusted MiTM key";
69 
70 char s256[] = "S256";
71 char s384[] = "S384";
72 char skn2[] = "SKN2";
73 char skn3[] = "SKN3";
74 const char* mandatoryHash = s256;
75 
76 char aes3[] = "AES3";
77 char aes2[] = "AES2";
78 char aes1[] = "AES1";
79 char two3[] = "2FS3";
80 char two2[] = "2FS2";
81 char two1[] = "2FS1";
82 const char* mandatoryCipher = aes1;
83 
84 char dh2k[] = "DH2k";
85 char ec25[] = "EC25";
86 char dh3k[] = "DH3k";
87 char ec38[] = "EC38";
88 char e255[] = "E255";
89 char e414[] = "E414";
90 char mult[] = "Mult";
91 const char* mandatoryPubKey = dh3k;
92 
93 char b32[] =  "B32 ";
94 char b256[] = "B256";
95 char b32e[] = "B32E";       // Use Emojis instead of letters/digits
96 
97 const char* mandatorySasType = b32;
98 
99 char hs32[] = "HS32";
100 char hs80[] = "HS80";
101 char sk32[] = "SK32";
102 char sk64[] = "SK64";
103 const char* mandatoryAuthLen_1 = hs32;
104 const char* mandatoryAuthLen_2 = hs80;
105 
106 const char* sas256WordsOdd[] = {
107     "adroitness",
108     "adviser",
109     "aftermath",
110     "aggregate",
111     "alkali",
112     "almighty",
113     "amulet",
114     "amusement",
115     "antenna",
116     "applicant",
117     "Apollo",
118     "armistice",
119     "article",
120     "asteroid",
121     "Atlantic",
122     "atmosphere",
123     "autopsy",
124     "Babylon",
125     "backwater",
126     "barbecue",
127     "belowground",
128     "bifocals",
129     "bodyguard",
130     "bookseller",
131     "borderline",
132     "bottomless",
133     "Bradbury",
134     "bravado",
135     "Brazilian",
136     "breakaway",
137     "Burlington",
138     "businessman",
139     "butterfat",
140     "Camelot",
141     "candidate",
142     "cannonball",
143     "Capricorn",
144     "caravan",
145     "caretaker",
146     "celebrate",
147     "cellulose",
148     "certify",
149     "chambermaid",
150     "Cherokee",
151     "Chicago",
152     "clergyman",
153     "coherence",
154     "combustion",
155     "commando",
156     "company",
157     "component",
158     "concurrent",
159     "confidence",
160     "conformist",
161     "congregate",
162     "consensus",
163     "consulting",
164     "corporate",
165     "corrosion",
166     "councilman",
167     "crossover",
168     "crucifix",
169     "cumbersome",
170     "customer",
171     "Dakota",
172     "decadence",
173     "December",
174     "decimal",
175     "designing",
176     "detector",
177     "detergent",
178     "determine",
179     "dictator",
180     "dinosaur",
181     "direction",
182     "disable",
183     "disbelief",
184     "disruptive",
185     "distortion",
186     "document",
187     "embezzle",
188     "enchanting",
189     "enrollment",
190     "enterprise",
191     "equation",
192     "equipment",
193     "escapade",
194     "Eskimo",
195     "everyday",
196     "examine",
197     "existence",
198     "exodus",
199     "fascinate",
200     "filament",
201     "finicky",
202     "forever",
203     "fortitude",
204     "frequency",
205     "gadgetry",
206     "Galveston",
207     "getaway",
208     "glossary",
209     "gossamer",
210     "graduate",
211     "gravity",
212     "guitarist",
213     "hamburger",
214     "Hamilton",
215     "handiwork",
216     "hazardous",
217     "headwaters",
218     "hemisphere",
219     "hesitate",
220     "hideaway",
221     "holiness",
222     "hurricane",
223     "hydraulic",
224     "impartial",
225     "impetus",
226     "inception",
227     "indigo",
228     "inertia",
229     "infancy",
230     "inferno",
231     "informant",
232     "insincere",
233     "insurgent",
234     "integrate",
235     "intention",
236     "inventive",
237     "Istanbul",
238     "Jamaica",
239     "Jupiter",
240     "leprosy",
241     "letterhead",
242     "liberty",
243     "maritime",
244     "matchmaker",
245     "maverick",
246     "Medusa",
247     "megaton",
248     "microscope",
249     "microwave",
250     "midsummer",
251     "millionaire",
252     "miracle",
253     "misnomer",
254     "molasses",
255     "molecule",
256     "Montana",
257     "monument",
258     "mosquito",
259     "narrative",
260     "nebula",
261     "newsletter",
262     "Norwegian",
263     "October",
264     "Ohio",
265     "onlooker",
266     "opulent",
267     "Orlando",
268     "outfielder",
269     "Pacific",
270     "pandemic",
271     "Pandora",
272     "paperweight",
273     "paragon",
274     "paragraph",
275     "paramount",
276     "passenger",
277     "pedigree",
278     "Pegasus",
279     "penetrate",
280     "perceptive",
281     "performance",
282     "pharmacy",
283     "phonetic",
284     "photograph",
285     "pioneer",
286     "pocketful",
287     "politeness",
288     "positive",
289     "potato",
290     "processor",
291     "provincial",
292     "proximate",
293     "puberty",
294     "publisher",
295     "pyramid",
296     "quantity",
297     "racketeer",
298     "rebellion",
299     "recipe",
300     "recover",
301     "repellent",
302     "replica",
303     "reproduce",
304     "resistor",
305     "responsive",
306     "retraction",
307     "retrieval",
308     "retrospect",
309     "revenue",
310     "revival",
311     "revolver",
312     "sandalwood",
313     "sardonic",
314     "Saturday",
315     "savagery",
316     "scavenger",
317     "sensation",
318     "sociable",
319     "souvenir",
320     "specialist",
321     "speculate",
322     "stethoscope",
323     "stupendous",
324     "supportive",
325     "surrender",
326     "suspicious",
327     "sympathy",
328     "tambourine",
329     "telephone",
330     "therapist",
331     "tobacco",
332     "tolerance",
333     "tomorrow",
334     "torpedo",
335     "tradition",
336     "travesty",
337     "trombonist",
338     "truncated",
339     "typewriter",
340     "ultimate",
341     "undaunted",
342     "underfoot",
343     "unicorn",
344     "unify",
345     "universe",
346     "unravel",
347     "upcoming",
348     "vacancy",
349     "vagabond",
350     "vertigo",
351     "Virginia",
352     "visitor",
353     "vocalist",
354     "voyager",
355     "warranty",
356     "Waterloo",
357     "whimsical",
358     "Wichita",
359     "Wilmington",
360     "Wyoming",
361     "yesteryear",
362     "Yucatan"
363     };
364 
365 const char* sas256WordsEven[] = {
366     "aardvark",
367     "absurd",
368     "accrue",
369     "acme",
370     "adrift",
371     "adult",
372     "afflict",
373     "ahead",
374     "aimless",
375     "Algol",
376     "allow",
377     "alone",
378     "ammo",
379     "ancient",
380     "apple",
381     "artist",
382     "assume",
383     "Athens",
384     "atlas",
385     "Aztec",
386     "baboon",
387     "backfield",
388     "backward",
389     "banjo",
390     "beaming",
391     "bedlamp",
392     "beehive",
393     "beeswax",
394     "befriend",
395     "Belfast",
396     "berserk",
397     "billiard",
398     "bison",
399     "blackjack",
400     "blockade",
401     "blowtorch",
402     "bluebird",
403     "bombast",
404     "bookshelf",
405     "brackish",
406     "breadline",
407     "breakup",
408     "brickyard",
409     "briefcase",
410     "Burbank",
411     "button",
412     "buzzard",
413     "cement",
414     "chairlift",
415     "chatter",
416     "checkup",
417     "chisel",
418     "choking",
419     "chopper",
420     "Christmas",
421     "clamshell",
422     "classic",
423     "classroom",
424     "cleanup",
425     "clockwork",
426     "cobra",
427     "commence",
428     "concert",
429     "cowbell",
430     "crackdown",
431     "cranky",
432     "crowfoot",
433     "crucial",
434     "crumpled",
435     "crusade",
436     "cubic",
437     "dashboard",
438     "deadbolt",
439     "deckhand",
440     "dogsled",
441     "dragnet",
442     "drainage",
443     "dreadful",
444     "drifter",
445     "dropper",
446     "drumbeat",
447     "drunken",
448     "Dupont",
449     "dwelling",
450     "eating",
451     "edict",
452     "egghead",
453     "eightball",
454     "endorse",
455     "endow",
456     "enlist",
457     "erase",
458     "escape",
459     "exceed",
460     "eyeglass",
461     "eyetooth",
462     "facial",
463     "fallout",
464     "flagpole",
465     "flatfoot",
466     "flytrap",
467     "fracture",
468     "framework",
469     "freedom",
470     "frighten",
471     "gazelle",
472     "Geiger",
473     "glitter",
474     "glucose",
475     "goggles",
476     "goldfish",
477     "gremlin",
478     "guidance",
479     "hamlet",
480     "highchair",
481     "hockey",
482     "indoors",
483     "indulge",
484     "inverse",
485     "involve",
486     "island",
487     "jawbone",
488     "keyboard",
489     "kickoff",
490     "kiwi",
491     "klaxon",
492     "locale",
493     "lockup",
494     "merit",
495     "minnow",
496     "miser",
497     "Mohawk",
498     "mural",
499     "music",
500     "necklace",
501     "Neptune",
502     "newborn",
503     "nightbird",
504     "Oakland",
505     "obtuse",
506     "offload",
507     "optic",
508     "orca",
509     "payday",
510     "peachy",
511     "pheasant",
512     "physique",
513     "playhouse",
514     "Pluto",
515     "preclude",
516     "prefer",
517     "preshrunk",
518     "printer",
519     "prowler",
520     "pupil",
521     "puppy",
522     "python",
523     "quadrant",
524     "quiver",
525     "quota",
526     "ragtime",
527     "ratchet",
528     "rebirth",
529     "reform",
530     "regain",
531     "reindeer",
532     "rematch",
533     "repay",
534     "retouch",
535     "revenge",
536     "reward",
537     "rhythm",
538     "ribcage",
539     "ringbolt",
540     "robust",
541     "rocker",
542     "ruffled",
543     "sailboat",
544     "sawdust",
545     "scallion",
546     "scenic",
547     "scorecard",
548     "Scotland",
549     "seabird",
550     "select",
551     "sentence",
552     "shadow",
553     "shamrock",
554     "showgirl",
555     "skullcap",
556     "skydive",
557     "slingshot",
558     "slowdown",
559     "snapline",
560     "snapshot",
561     "snowcap",
562     "snowslide",
563     "solo",
564     "southward",
565     "soybean",
566     "spaniel",
567     "spearhead",
568     "spellbind",
569     "spheroid",
570     "spigot",
571     "spindle",
572     "spyglass",
573     "stagehand",
574     "stagnate",
575     "stairway",
576     "standard",
577     "stapler",
578     "steamship",
579     "sterling",
580     "stockman",
581     "stopwatch",
582     "stormy",
583     "sugar",
584     "surmount",
585     "suspense",
586     "sweatband",
587     "swelter",
588     "tactics",
589     "talon",
590     "tapeworm",
591     "tempest",
592     "tiger",
593     "tissue",
594     "tonic",
595     "topmost",
596     "tracker",
597     "transit",
598     "trauma",
599     "treadmill",
600     "Trojan",
601     "trouble",
602     "tumor",
603     "tunnel",
604     "tycoon",
605     "uncut",
606     "unearth",
607     "unwind",
608     "uproot",
609     "upset",
610     "upshot",
611     "vapor",
612     "village",
613     "virus",
614     "Vulcan",
615     "waffle",
616     "wallet",
617     "watchword",
618     "wayside",
619     "willow",
620     "woodlark",
621     "Zulu"
622     };
623