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