Safe Primes and Number Nerdery

Jeff Marrison

Disclaimer: The views expressed here are solely those of the author, and do not necessarily represent the views of 2 Ton Digital.

Introduction

In releasing both the public DH parameter service and now the updated Safe Prime API and Database, a decent number of people use our service for their safe prime seed. In addition to being useful as a dhparam tool like the one we have had up for ages, in the new API I added JSON support for no other reason than to visually display these numbers and example Diffie-Hellman exchanges of how they are used in real-world terms. (Haha, I am guilty of being a number nerd no doubt). See the API details on the Safe Prime page if you are interested in pulling any of these for yourself.

When we talk about key lengths and prime number sizes, most people have not bothered to query WolframAlpha for a visual indication of just how large the numbers are. Further, although the Wikipedia article on Diffie-Hellman key exchange shows an example exchange using the modulus 23, not many people in our experience know what a real-world sized exchange looks like in base 10. While this makes for a very long page full of numbers, I have found it makes for great conversation and inspires young minds interested in maths.

All of the primes we generate are almost certainly prime. All of the 6 primes on the static version of this page, as well as all randomly sampled primes we have pulled were certified prime with the ECPP algorithm using Primo. We use an overkill number of Miller-Rabin primality tests on both the safe prime and its Sophie Germain counterpart. Please see the dhtool page for more information about how we generate the primes themselves.

The static version of this page includes a hand-sampled set of numbers per size, but as mentioned before, if you have javascript enabled, these should update dynamically to pick a new random set on each page load from our prime database. Cheers!

Sample 2048-bit Safe Prime DH params

Safe Prime p (617 base10 digits):
pretty: 25,800,067,874,133,260,660,345,127,251,227,020,705,188,496,548,274,116,921,985,993,281,967,804,952,257,240,775,824,020,848,001,229,598,175,098,319,282,710,192,845,525,779,715,822,266,921,439,719,962,740,689,815,792,179,289,552,165,093,500,569,732,139,859,156,449,894,441,889,441,354,076,602,361,108,516,361,006,065,046,229,284,963,836,542,104,104,891,102,486,847,219,857,584,215,538,678,231,372,880,855,971,808,838,769,884,267,599,980,835,796,736,677,757,949,174,359,988,755,199,002,755,842,046,077,673,426,953,046,644,694,000,074,704,797,242,058,362,756,844,455,280,559,067,346,551,446,195,890,225,188,830,903,078,346,661,209,619,597,597,756,671,109,943,973,624,946,449,357,010,655,501,482,563,928,303,243,656,236,782,371,921,280,826,026,539,392,037,151,889,122,886,236,682,224,776,441,425,694,641,443,902,512,856,864,507
base10: 25800067874133260660345127251227020705188496548274116921985993281967804952257240775824020848001229598175098319282710192845525779715822266921439719962740689815792179289552165093500569732139859156449894441889441354076602361108516361006065046229284963836542104104891102486847219857584215538678231372880855971808838769884267599980835796736677757949174359988755199002755842046077673426953046644694000074704797242058362756844455280559067346551446195890225188830903078346661209619597597756671109943973624946449357010655501482563928303243656236782371921280826026539392037151889122886236682224776441425694641443902512856864507
base16: 0xcc603b56298c54c737b7bdd033f6f6d2e1b85deae6a0fdb4684c2ea1a3c5ee6d7915d81199862712eecde9c6b42cef3549ccdbe664e22e6fa349e55ea97fbefee47e1c456b1d9c600c772f45179df2a362ca5ded3b2128a59848965400c1b320f33a7e1bba65593dbcbb9f6569b8f9fe1bfa6e26dea0b5b44412142693564728860881c54fce83d7b0c909b3341a11eb801daace3f3d2c5693741aafd57ecc022d64a65d520455814f11a2b2aec40a18ce47d01f372f051e8435fb6d6324b29492b95c1c663033acf5d20e234a3624b8056a7cac078e6abb0a279873f14ae5bf7383bbea67c944cd1eed127b2a64c80292658d9d2f593c493dfd6a1961e096fb

Sophie Germain Prime q (617 base10 digits):
pretty: 12,900,033,937,066,630,330,172,563,625,613,510,352,594,248,274,137,058,460,992,996,640,983,902,476,128,620,387,912,010,424,000,614,799,087,549,159,641,355,096,422,762,889,857,911,133,460,719,859,981,370,344,907,896,089,644,776,082,546,750,284,866,069,929,578,224,947,220,944,720,677,038,301,180,554,258,180,503,032,523,114,642,481,918,271,052,052,445,551,243,423,609,928,792,107,769,339,115,686,440,427,985,904,419,384,942,133,799,990,417,898,368,338,878,974,587,179,994,377,599,501,377,921,023,038,836,713,476,523,322,347,000,037,352,398,621,029,181,378,422,227,640,279,533,673,275,723,097,945,112,594,415,451,539,173,330,604,809,798,798,878,335,554,971,986,812,473,224,678,505,327,750,741,281,964,151,621,828,118,391,185,960,640,413,013,269,696,018,575,944,561,443,118,341,112,388,220,712,847,320,721,951,256,428,432,253
base10: 12900033937066630330172563625613510352594248274137058460992996640983902476128620387912010424000614799087549159641355096422762889857911133460719859981370344907896089644776082546750284866069929578224947220944720677038301180554258180503032523114642481918271052052445551243423609928792107769339115686440427985904419384942133799990417898368338878974587179994377599501377921023038836713476523322347000037352398621029181378422227640279533673275723097945112594415451539173330604809798798878335554971986812473224678505327750741281964151621828118391185960640413013269696018575944561443118341112388220712847320721951256428432253
base16: 0x66301dab14c62a639bdbdee819fb7b6970dc2ef573507eda34261750d1e2f736bc8aec08ccc313897766f4e35a16779aa4e66df332711737d1a4f2af54bfdf7f723f0e22b58ece30063b97a28bcef951b1652ef69d909452cc244b2a0060d990799d3f0ddd32ac9ede5dcfb2b4dc7cff0dfd37136f505ada22090a1349ab2394430440e2a7e741ebd86484d99a0d08f5c00ed5671f9e962b49ba0d57eabf660116b2532ea9022ac0a788d1595762050c6723e80f9b97828f421afdb6b192594a495cae0e331819d67ae90711a51b125c02b53e5603c7355d8513cc39f8a572dfb9c1ddf533e4a2668f76893d953264014932c6ce97ac9e249efeb50cb0f04b7d

Generator g:
3

Example 2048-bit DH exchange

Alice's Secret a = 512 bit random number (154 base10 digits):
pretty: 1,584,798,230,576,126,440,959,818,004,512,461,770,547,633,429,977,999,562,727,323,506,221,580,381,204,318,963,782,100,566,162,773,387,877,504,766,412,974,585,967,295,081,679,124,248,780,857,901,760,336,490
base10: 1584798230576126440959818004512461770547633429977999562727323506221580381204318963782100566162773387877504766412974585967295081679124248780857901760336490
base16: 0x1e42551779589e54882307331ee79e451e920d9bca47c692d1921185e2e3ff7e2a4e846fdbe55909ab3c976f20ee24e838f7c73482df85755bf1c3d30bdb526a

Alice's Public A = g**a mod p (617 base10 digits):
pretty: 11,706,518,816,914,002,122,676,815,182,288,424,037,361,740,496,140,625,393,452,752,353,962,837,584,466,090,015,161,974,102,156,245,191,811,983,868,212,510,861,233,415,275,357,291,783,719,711,584,215,192,805,293,050,658,099,447,692,271,891,908,647,490,706,617,502,982,948,793,950,078,261,760,179,137,506,129,594,905,835,359,274,971,846,630,716,621,641,888,913,782,993,818,611,345,724,388,373,289,964,423,984,693,064,542,096,349,585,150,018,708,244,937,842,671,641,884,027,683,596,115,267,534,749,874,905,740,075,811,482,990,587,541,800,261,421,891,599,145,542,442,790,594,293,593,355,805,513,133,125,915,392,147,599,089,953,937,159,034,429,664,007,742,293,970,366,855,175,563,883,714,236,240,255,543,329,284,590,305,743,748,816,587,029,756,658,689,946,186,559,691,675,676,548,740,344,898,699,447,823,444,437,649,598,428,261
base10: 11706518816914002122676815182288424037361740496140625393452752353962837584466090015161974102156245191811983868212510861233415275357291783719711584215192805293050658099447692271891908647490706617502982948793950078261760179137506129594905835359274971846630716621641888913782993818611345724388373289964423984693064542096349585150018708244937842671641884027683596115267534749874905740075811482990587541800261421891599145542442790594293593355805513133125915392147599089953937159034429664007742293970366855175563883714236240255543329284590305743748816587029756658689946186559691675676548740344898699447823444437649598428261
base16: 0x5cbbc61e29c92234a713b7b078174b3b9a130d78d542603316eb8865841ba41c314b6087678f38d79e3df09f3b05156f059b6f3ac6a3ee56110007f1c5b8a39ac51d6e80ca0435c4916501497a5817c38092c4b751e9b7b35e21f89e7e9f099c60b2b335cea8f1429c7886329ec6d8176163d0ff05815a6002aec1a4eb88a2796f67b05588f93785677c1748d6ae071f58d135550355a7c0ea5c270e582af9a021a2490bb88eaac9389784fed7dbbf151da05c3ea6e3fc9a8f048056d73a17e4ae232ac0f80d26b0838cb1f338d9f5ecebe2b6436e40dfb407e3c9286706a5cb17562e12c9e21fc51d0c447e0d09eb5a53cfc419906da7de2144f0294bfbb465

Bob's Secret b = 512 bit random number (154 base10 digits):
pretty: 2,967,556,634,274,421,523,372,875,717,106,065,110,651,718,792,669,286,918,334,885,733,220,813,782,527,274,052,668,227,702,887,572,179,225,579,573,646,442,454,944,591,378,712,795,693,267,989,357,283,452,407
base10: 2967556634274421523372875717106065110651718792669286918334885733220813782527274052668227702887572179225579573646442454944591378712795693267989357283452407
base16: 0x38a91d5b6fca914bec07d7682a2dc0140a58df5fa4e1cfa38232d28546835c79602a8a30566d3bfc7559b62d30ff60b767309564914eac240d617b95210b25f7

Bob's Public B = g**b mod p (616 base10 digits):
pretty: 9,656,891,112,320,959,490,795,051,007,601,392,123,201,237,724,332,656,440,301,696,573,409,948,246,603,623,824,645,721,819,240,169,014,691,833,035,566,939,519,805,956,248,250,631,610,484,516,286,963,974,840,631,352,087,099,232,083,277,374,595,493,637,835,888,417,892,546,816,111,450,783,133,805,321,658,422,476,291,285,715,188,062,429,348,390,414,519,257,906,853,728,392,720,843,828,005,311,102,800,948,916,033,647,039,236,134,463,382,243,924,047,501,437,114,858,503,344,346,896,227,335,383,275,289,511,732,143,567,851,779,788,307,947,156,261,709,224,031,390,366,316,628,002,663,474,719,140,724,571,352,277,963,675,994,954,343,959,169,580,581,927,963,699,675,054,698,536,495,571,534,351,588,436,573,418,443,734,596,201,163,930,912,353,827,184,394,821,120,384,121,917,101,388,954,537,111,974,616,970,932,728,447,332,360,208
base10: 9656891112320959490795051007601392123201237724332656440301696573409948246603623824645721819240169014691833035566939519805956248250631610484516286963974840631352087099232083277374595493637835888417892546816111450783133805321658422476291285715188062429348390414519257906853728392720843828005311102800948916033647039236134463382243924047501437114858503344346896227335383275289511732143567851779788307947156261709224031390366316628002663474719140724571352277963675994954343959169580581927963699675054698536495571534351588436573418443734596201163930912353827184394821120384121917101388954537111974616970932728447332360208
base16: 0x4c7f4fe597c9e3a91e306b5b108f70d2d0933af8697be1ef3d391f788b1e7097205921995efacc1de3995fb13c2fa67d2c8aafb6fa3de6918ca41ab49de64df9300c7d15550a7f0ae982ecc2dfc04a8959b703b6cb73013a34aa54760a8ba24e5462ffd6c4b22db1a359c5cd3f9ea629ce3c7c925f54e96271a9eb364bd6291726a810ab8faacb0b4e810b96b3098cd251ba047849c83ee38fa41095f48e00ae09cd66b3ebdadf0569c7ee2ec43e295b4e3283dc2890bf8ad441e0916b29bb2aa97962458cb6ef3866cd8ca01f40979e3d270dda4e1dfeb87f19ce4bc9d88d74e6791e2f76349dd346bb3c2f3f7954a6ad213d20472ffaba15af4754170da010

Shared Secret s for Alice = B**a mod p:
Shared Secret s for Bob = A**b mod p (616 base10 digits):
pretty: 4,876,235,860,564,517,525,510,790,049,775,292,303,382,542,464,380,571,984,994,095,462,234,645,544,836,162,168,900,342,026,950,635,035,760,625,248,367,277,099,854,921,937,525,903,963,455,049,650,023,473,012,968,991,202,178,279,971,729,565,480,255,839,834,674,539,535,269,180,357,802,366,340,499,339,619,209,383,593,970,130,920,620,851,398,902,839,771,459,340,725,195,211,492,318,805,823,333,696,193,428,554,708,541,395,233,448,195,072,020,377,093,094,533,223,083,729,714,539,667,469,795,042,700,191,846,637,602,723,501,803,756,795,582,093,954,876,740,212,097,090,253,961,672,462,649,623,351,003,968,240,006,447,879,124,876,174,096,432,520,510,303,201,576,074,257,712,390,015,597,572,624,918,551,327,596,421,704,451,621,152,790,147,435,416,311,791,769,696,655,930,711,544,281,776,406,721,880,442,963,022,456,240,175,677,234
base10: 4876235860564517525510790049775292303382542464380571984994095462234645544836162168900342026950635035760625248367277099854921937525903963455049650023473012968991202178279971729565480255839834674539535269180357802366340499339619209383593970130920620851398902839771459340725195211492318805823333696193428554708541395233448195072020377093094533223083729714539667469795042700191846637602723501803756795582093954876740212097090253961672462649623351003968240006447879124876174096432520510303201576074257712390015597572624918551327596421704451621152790147435416311791769696655930711544281776406721880442963022456240175677234
base16: 0x26a0920d3f373de5d0bffdba8e12eaeba0b7fc5ae17aa3c038cef76d2d71ff03e6dbeb3ef8f9c373358996705840b810415d734a1f05614706b263819af9b748671c2294478b51d22c525f18d06faacef9c8a13673b9c15c21945473bc84a190c3ed38fdc27fc611b9e720dde465b11ed3507f51e8b71ff7dbb576f66fc476e10103e0dc831bd6357ad5c6613dc914e37acf1e4ea379ccdf5908459b31a770e6c78aadc1087c128bd1c00485af26a30499db41b5ea7cc50195bb829336030373d78b58e73df361ed14fb1261d1ef333ea6b3e8f8f35c03b3bd00f12b91866d9d47ab3eb88eca5db00245b952b7d5046488fc82a0c75255212515de0a40157f32

Sample 4096-bit Safe Prime DH params

Safe Prime p (1233 base10 digits):
pretty: 899,630,774,163,945,537,207,555,407,001,180,676,391,021,689,086,636,320,791,661,992,339,784,274,865,436,963,961,098,369,491,502,743,905,240,506,547,704,662,591,746,242,453,097,167,842,649,680,016,302,702,598,748,244,885,713,660,256,538,647,667,789,378,791,682,078,221,576,252,824,073,286,770,100,014,141,172,215,226,314,272,382,718,310,093,469,781,245,545,548,868,073,006,534,040,475,314,488,032,896,712,106,320,324,211,689,010,698,652,347,652,301,115,524,943,337,240,248,061,638,904,266,052,941,705,225,635,467,996,851,361,819,937,151,802,512,110,606,843,189,148,393,481,881,281,012,238,843,869,093,701,249,510,119,542,990,383,754,750,717,827,039,723,823,416,976,593,659,929,156,757,611,636,360,566,828,304,480,779,143,698,804,496,408,487,088,139,744,741,053,440,826,450,997,441,882,800,317,032,479,508,693,153,357,017,544,525,634,642,640,303,018,023,032,103,210,109,175,945,473,125,640,838,771,912,188,110,707,765,262,784,339,609,816,216,812,134,257,851,441,200,172,309,824,570,032,709,058,123,223,578,857,818,792,844,891,147,310,361,123,877,614,656,228,888,069,048,278,286,474,538,846,194,583,292,665,988,956,497,978,462,879,804,300,553,798,364,522,519,844,019,134,168,340,980,737,968,776,917,793,608,525,005,693,715,221,389,108,631,602,674,574,126,952,379,281,816,950,169,477,105,762,704,202,195,903,596,901,655,344,095,551,517,433,580,861,252,775,933,375,736,549,603,897,267,564,507,424,780,541,142,141,574,783,025,016,561,803,409,558,836,820,943,780,050,775,013,292,353,719,034,477,759,060,160,243,820,781,481,402,984,315,782,928,702,268,643,631,514,517,954,875,066,737,993,785,867,944,129,184,878,704,253,043,679,394,560,481,657,545,447
base10: 899630774163945537207555407001180676391021689086636320791661992339784274865436963961098369491502743905240506547704662591746242453097167842649680016302702598748244885713660256538647667789378791682078221576252824073286770100014141172215226314272382718310093469781245545548868073006534040475314488032896712106320324211689010698652347652301115524943337240248061638904266052941705225635467996851361819937151802512110606843189148393481881281012238843869093701249510119542990383754750717827039723823416976593659929156757611636360566828304480779143698804496408487088139744741053440826450997441882800317032479508693153357017544525634642640303018023032103210109175945473125640838771912188110707765262784339609816216812134257851441200172309824570032709058123223578857818792844891147310361123877614656228888069048278286474538846194583292665988956497978462879804300553798364522519844019134168340980737968776917793608525005693715221389108631602674574126952379281816950169477105762704202195903596901655344095551517433580861252775933375736549603897267564507424780541142141574783025016561803409558836820943780050775013292353719034477759060160243820781481402984315782928702268643631514517954875066737993785867944129184878704253043679394560481657545447
base16: 0xdc84588ea826c00bc1a8594b90e108f24240af9077aa1cc0e41311328e8cffcf45dce2d7323cc4f95fbf6f90cf03b5452e12fc57dfff69ee2433503387a81b0586ca8fcbfa8812b1d1d4dd435d0ed2944f8f5652f904e59b95f19db21cc966be76b87732d624350a5912cb81791302cbfb396223706beb356f1f57841081cb0af1524235158f7a7e1d6d65b61feaa0811c70e33183c437b55b4ac749147d3f7bc01977e984d61c6ff0a004eedb3f614694a1d8182408145600d6e354d74f10ce945f349f5d565bb03f3ec614f776236d414b09f4e4be40bb73f8143be8b6eb4f42eb78f52b57c461859aae81683de4c0d9e4a6752b787447a83cc79c79e6b6170f4cda2dfb2f22fd5903d6bc98734ed4f51bdb65081c2addb0a9098e405f3b07bfd4c75fa95f252ca28974f260168242d862be061836e92a1523aa241aeddb7e4943e03b46713da175d8e1eb9d21f6c8670226b5a6c630f27a7a50219e6e840f5c37c726fc063230e64f171c42ef1b56ff3ebfacc779be642c14a84983b4a127cbcf723a5017eda3bc85d5abc84e710d7ca92f45748d4821b1c3e170ca001d7ed1bd7f8498914ca8261976ef103435f35538fc6235241bc4a89665263ee914663f75b475b9edbc2b2d3c303eeac850083f52fdb57b3e704baa674e24854d67164fdac2840f78ece1f2cbd771da972f8cecf629231439d913e3900b65e3b6e2e7

Sophie Germain Prime q (1233 base10 digits):
pretty: 449,815,387,081,972,768,603,777,703,500,590,338,195,510,844,543,318,160,395,830,996,169,892,137,432,718,481,980,549,184,745,751,371,952,620,253,273,852,331,295,873,121,226,548,583,921,324,840,008,151,351,299,374,122,442,856,830,128,269,323,833,894,689,395,841,039,110,788,126,412,036,643,385,050,007,070,586,107,613,157,136,191,359,155,046,734,890,622,772,774,434,036,503,267,020,237,657,244,016,448,356,053,160,162,105,844,505,349,326,173,826,150,557,762,471,668,620,124,030,819,452,133,026,470,852,612,817,733,998,425,680,909,968,575,901,256,055,303,421,594,574,196,740,940,640,506,119,421,934,546,850,624,755,059,771,495,191,877,375,358,913,519,861,911,708,488,296,829,964,578,378,805,818,180,283,414,152,240,389,571,849,402,248,204,243,544,069,872,370,526,720,413,225,498,720,941,400,158,516,239,754,346,576,678,508,772,262,817,321,320,151,509,011,516,051,605,054,587,972,736,562,820,419,385,956,094,055,353,882,631,392,169,804,908,108,406,067,128,925,720,600,086,154,912,285,016,354,529,061,611,789,428,909,396,422,445,573,655,180,561,938,807,328,114,444,034,524,139,143,237,269,423,097,291,646,332,994,478,248,989,231,439,902,150,276,899,182,261,259,922,009,567,084,170,490,368,984,388,458,896,804,262,502,846,857,610,694,554,315,801,337,287,063,476,189,640,908,475,084,738,552,881,352,101,097,951,798,450,827,672,047,775,758,716,790,430,626,387,966,687,868,274,801,948,633,782,253,712,390,270,571,070,787,391,512,508,280,901,704,779,418,410,471,890,025,387,506,646,176,859,517,238,879,530,080,121,910,390,740,701,492,157,891,464,351,134,321,815,757,258,977,437,533,368,996,892,933,972,064,592,439,352,126,521,839,697,280,240,828,772,723
base10: 449815387081972768603777703500590338195510844543318160395830996169892137432718481980549184745751371952620253273852331295873121226548583921324840008151351299374122442856830128269323833894689395841039110788126412036643385050007070586107613157136191359155046734890622772774434036503267020237657244016448356053160162105844505349326173826150557762471668620124030819452133026470852612817733998425680909968575901256055303421594574196740940640506119421934546850624755059771495191877375358913519861911708488296829964578378805818180283414152240389571849402248204243544069872370526720413225498720941400158516239754346576678508772262817321320151509011516051605054587972736562820419385956094055353882631392169804908108406067128925720600086154912285016354529061611789428909396422445573655180561938807328114444034524139143237269423097291646332994478248989231439902150276899182261259922009567084170490368984388458896804262502846857610694554315801337287063476189640908475084738552881352101097951798450827672047775758716790430626387966687868274801948633782253712390270571070787391512508280901704779418410471890025387506646176859517238879530080121910390740701492157891464351134321815757258977437533368996892933972064592439352126521839697280240828772723
base16: 0x6e422c4754136005e0d42ca5c8708479212057c83bd50e607209889947467fe7a2ee716b991e627cafdfb7c86781daa297097e2befffb4f71219a819c3d40d82c36547e5fd440958e8ea6ea1ae87694a27c7ab297c8272cdcaf8ced90e64b35f3b5c3b996b121a852c8965c0bc898165fd9cb111b835f59ab78fabc20840e58578a9211a8ac7bd3f0eb6b2db0ff550408e387198c1e21bdaada563a48a3e9fbde00cbbf4c26b0e37f85002776d9fb0a34a50ec0c12040a2b006b71aa6ba788674a2f9a4faeab2dd81f9f630a7bbb11b6a0a584fa725f205db9fc0a1df45b75a7a175bc7a95abe230c2cd5740b41ef2606cf2533a95bc3a23d41e63ce3cf35b0b87a66d16fd97917eac81eb5e4c39a76a7a8dedb2840e156ed85484c7202f9d83dfea63afd4af92965144ba79300b41216c315f030c1b74950a91d5120d76edbf24a1f01da3389ed0baec70f5ce90fb643381135ad36318793d3d2810cf374207ae1be3937e03191873278b8e21778dab7f9f5fd663bcdf32160a5424c1da5093e5e7b91d280bf6d1de42ead5e4273886be5497a2ba46a410d8e1f0b865000ebf68debfc24c48a654130cbb77881a1af9aa9c7e311a920de2544b32931f748a331fbada3adcf6de15969e181f756428041fa97edabd9f3825d533a71242a6b38b27ed614207bc7670f965ebb8ed4b97c6767b14918a1cec89f1c805b2f1db7173

Generator g:
2

Example 4096-bit DH exchange

Alice's Secret a = 512 bit random number (155 base10 digits):
pretty: 13,203,194,625,670,185,480,128,435,655,453,226,638,207,975,484,527,843,468,542,307,982,129,013,936,393,155,756,177,038,030,103,894,113,431,191,487,717,375,652,131,633,094,710,530,853,802,409,502,851,980,299
base10: 13203194625670185480128435655453226638207975484527843468542307982129013936393155756177038030103894113431191487717375652131633094710530853802409502851980299
base16: 0xfc17def9fea248d8e950a87d7ef4c8d9aa408f0ce0cc724a5926b50ee0ea09787c71ecf92a5e62ef9274399c81bf3f90db5c172509fd93246c1e5974a357dc0b

Alice's Public A = g**a mod p (1233 base10 digits):
pretty: 618,011,160,455,794,009,918,321,745,210,158,030,875,185,488,574,196,327,774,424,129,032,681,645,048,375,509,365,907,109,092,536,701,899,728,528,275,214,688,236,274,627,630,333,091,926,779,679,681,052,998,217,785,834,474,333,919,863,537,817,182,303,565,568,289,777,068,027,473,005,469,137,684,326,949,495,932,608,766,675,761,395,659,349,101,140,819,875,973,921,403,929,177,088,718,682,325,085,662,589,718,750,327,305,578,745,757,288,326,966,366,375,830,999,261,194,844,127,837,578,010,797,952,116,676,536,977,115,180,498,279,783,668,655,484,084,241,789,521,105,617,337,957,165,136,483,765,836,863,974,220,582,244,575,514,166,240,680,862,635,059,413,215,430,344,785,312,509,907,553,877,389,770,310,785,149,137,456,214,671,964,170,636,308,903,259,608,814,109,274,771,864,887,255,691,112,823,174,525,829,625,024,159,301,957,515,164,633,968,562,313,740,255,437,300,341,216,551,644,893,366,474,673,581,567,386,447,998,848,791,363,145,060,776,995,372,079,323,168,444,151,371,894,602,245,717,672,512,377,460,472,501,221,443,089,987,252,902,602,118,645,591,318,799,058,764,142,063,214,454,750,846,619,691,273,563,165,415,038,755,671,221,484,285,925,621,086,007,530,407,061,645,633,037,182,687,486,450,744,487,782,848,635,541,062,980,824,246,625,860,412,260,470,424,040,607,052,923,817,407,433,267,217,031,963,984,265,022,233,920,724,022,367,147,761,660,049,690,915,807,156,307,941,266,867,416,399,481,452,161,535,612,682,685,510,992,358,751,062,782,215,696,755,942,698,638,373,746,430,346,329,804,745,522,142,526,887,926,125,075,411,678,008,849,760,944,468,572,142,073,340,283,825,678,852,384,907,610,422,476,764,025,454,363,750,630,977,298,210,801,215
base10: 618011160455794009918321745210158030875185488574196327774424129032681645048375509365907109092536701899728528275214688236274627630333091926779679681052998217785834474333919863537817182303565568289777068027473005469137684326949495932608766675761395659349101140819875973921403929177088718682325085662589718750327305578745757288326966366375830999261194844127837578010797952116676536977115180498279783668655484084241789521105617337957165136483765836863974220582244575514166240680862635059413215430344785312509907553877389770310785149137456214671964170636308903259608814109274771864887255691112823174525829625024159301957515164633968562313740255437300341216551644893366474673581567386447998848791363145060776995372079323168444151371894602245717672512377460472501221443089987252902602118645591318799058764142063214454750846619691273563165415038755671221484285925621086007530407061645633037182687486450744487782848635541062980824246625860412260470424040607052923817407433267217031963984265022233920724022367147761660049690915807156307941266867416399481452161535612682685510992358751062782215696755942698638373746430346329804745522142526887926125075411678008849760944468572142073340283825678852384907610422476764025454363750630977298210801215
base16: 0x977c8dd2e16a8349fbc30fab92e991a90437700fc6e8185bf7df1b49e99bd918c9889196f61f523ec6a8d46e819b58c4ad27f363a7c5acc7d25a7616d50b9ed68130e2022e0992052712d6be3ae818034729183c0057890661cd84d41861a64bd1b8e58864262c573c9b7378344ca33368132e78d081510d7debbfe59cd2c1eeb8d5f1cd21fe3ce9e0b6df7883f03c2c3d4fcb2621c1128e0891a952a3fb358514b824c807c95b21e90a3a99c50d2fe0bf3e70d8d506b17d3ab4ce9d83650c7d0bef1ffb3f7933a09778fa81bf4a5c3fd2f2907522ec558b572ee12c1c1981a98be93621415a06782c926375c46fb8894094967fdecb88ccfeaf1d150caee46ecb6339c26dd251eb1300c8613fe6a4196fb4815f417d19cda54bc2607bb8d3d6787aca63e92713fce1579ca521858075926a848559e8232d9d2402961fc04ac4f469209785fb87f4b2727524c99d5b620f2a9937178e7019580de9de5849b9778ee59dc6b2191b12675dde351463537e3adb2091e51d919a8b6e9a5c4518440e5fe9aedbbb1c3bc3a27ecee07ec170f51c8241412f4435353bf491e5b944d0906f5c83deb610a23567582bdc965522bd468f9e0a2f397616e94b97b3098fe059a141a35912f19ff1028d0cd57a137e3a427e595d88f69c1d3065293ecf4ffba68b6d624464add01e4d4f158e77155c7c0974111b194dc6402cb8b6d6bb08c63f

Bob's Secret b = 512 bit random number (155 base10 digits):
pretty: 12,655,010,618,029,198,203,883,123,151,862,853,950,970,351,351,547,612,231,194,864,947,753,688,834,631,562,624,986,915,277,870,354,790,956,250,618,161,433,694,426,139,141,385,070,756,808,110,398,462,618,316
base10: 12655010618029198203883123151862853950970351351547612231194864947753688834631562624986915277870354790956250618161433694426139141385070756808110398462618316
base16: 0xf1a067446f5dc692f25d0d7fba9d32c70426a7cb8069381ed2badd6253bd4668b7d4c141aead31abf7923e4b67bdfbef6793b4f567dd30643770b26513b9eacc

Bob's Public B = g**b mod p (1232 base10 digits):
pretty: 83,456,007,696,073,721,335,398,285,773,890,106,989,869,119,804,148,503,975,733,610,515,724,588,925,630,370,744,607,516,030,881,781,001,749,763,064,802,524,643,825,672,597,159,978,162,165,831,913,568,204,951,227,703,431,121,239,254,830,342,602,763,343,574,836,673,159,572,452,900,162,179,063,542,557,187,651,573,933,205,790,924,832,563,145,129,146,689,250,827,067,470,793,361,040,369,925,909,319,494,174,064,074,366,931,225,747,460,099,337,336,292,737,537,816,130,393,553,446,052,553,861,795,656,414,251,126,452,648,023,616,879,689,324,041,125,408,306,985,277,509,246,344,983,479,947,676,081,004,191,440,687,604,136,825,838,012,628,452,090,282,159,098,483,324,307,621,503,090,032,583,941,014,092,883,495,762,191,036,570,572,261,908,967,299,267,590,873,120,873,971,166,990,922,914,032,621,800,760,673,469,414,341,852,517,411,961,400,973,850,040,542,571,913,818,710,335,567,211,138,499,546,214,338,720,051,942,867,257,959,943,220,395,688,694,126,445,857,465,194,538,601,916,807,030,450,057,976,263,400,762,871,052,789,852,412,033,048,186,850,022,950,281,031,527,366,375,979,319,418,490,514,886,251,682,099,055,453,409,034,010,534,608,799,050,896,662,351,637,725,714,867,489,464,998,646,867,919,696,429,391,774,444,792,018,021,465,188,253,866,735,072,781,459,840,913,716,048,316,896,976,476,855,893,272,022,741,237,513,748,315,914,559,800,639,426,617,276,003,918,785,451,945,592,534,850,749,081,743,245,176,255,979,238,646,155,156,118,124,552,180,791,484,171,656,124,585,451,829,356,007,291,281,910,524,491,315,053,894,500,349,346,875,889,580,182,966,769,801,569,101,261,882,115,490,295,856,393,046,973,447,787,359,311,005,934,508,050,460,352,480
base10: 83456007696073721335398285773890106989869119804148503975733610515724588925630370744607516030881781001749763064802524643825672597159978162165831913568204951227703431121239254830342602763343574836673159572452900162179063542557187651573933205790924832563145129146689250827067470793361040369925909319494174064074366931225747460099337336292737537816130393553446052553861795656414251126452648023616879689324041125408306985277509246344983479947676081004191440687604136825838012628452090282159098483324307621503090032583941014092883495762191036570572261908967299267590873120873971166990922914032621800760673469414341852517411961400973850040542571913818710335567211138499546214338720051942867257959943220395688694126445857465194538601916807030450057976263400762871052789852412033048186850022950281031527366375979319418490514886251682099055453409034010534608799050896662351637725714867489464998646867919696429391774444792018021465188253866735072781459840913716048316896976476855893272022741237513748315914559800639426617276003918785451945592534850749081743245176255979238646155156118124552180791484171656124585451829356007291281910524491315053894500349346875889580182966769801569101261882115490295856393046973447787359311005934508050460352480
base16: 0x1474e988cf6b03db1f7a236c341329d9da75684edd1d50f08a6a1e1cb9ddcf8f0dd4ca5d13b57af7e9e25767139f35c723e508a9dc7c4b2011cb6211bd8d4b0ebd13395042fb54a0b1ee749dfcd63108abee5b7f2bb988d012152f354e015eda5a0df0e4856e282014671f98c11d99a932d17730c611e39386efe39239bf5a9bef8335ce980917c40dbc6c189fde08ece16ef77f6a851c58788c8a10827b56207053ca9b6617b04202fd3d74ba08346c5a1a0a4d8ba0f32220c55678cc5e7ac0b61526ee763b410ba2d8ffeb9ced67aed664314cdb26a70d5e6403b71e32ea6cd8c6e9d923ce13f6e46d19476bffe3555be5c227bb8eb4922993dab2f40535322ab5bae0866566e804498c4195c859804622031e3bc0fc2ead6097f0e07669674525bea3fbfff754c09f4907e209e723ca86c4e50ff42a553279cb7408b7fa4f706f66b02d20ace121c63f7d4b1fd6a860ccc60327437b7f10bb9c04ba7e2849e80f4c2ff937ce0eae9330e4d88f5f9c03d4b0de4509257622ae0285ac7cfc95b9dffac4ce19e8fc5e1b0cab36d86b714d8536dee2c2f83035d846c1f6478611353c5ec8757b654d82991b40c30225442c479520d7479579aa1320d24b3e813f279d4c4f8824a25135a9680a418f76300eb2eea0ce9f60cd31f088d603f5b861da971aeb330e833a788ab28199279a0bb9aa79d8dec03c63a02ee3e45bc29fe0

Shared Secret s for Alice = B**a mod p:
Shared Secret s for Bob = A**b mod p (1233 base10 digits):
pretty: 893,169,552,902,474,950,329,690,178,817,777,929,717,592,220,738,063,917,315,910,451,757,655,390,738,936,990,062,390,558,847,003,354,439,200,947,371,947,745,552,871,917,864,045,815,599,918,854,437,908,611,406,876,744,489,315,171,313,559,663,016,423,927,804,113,165,332,406,895,041,205,544,312,935,213,461,059,476,482,463,744,416,427,830,809,568,436,204,138,332,644,781,412,716,944,339,201,723,813,319,745,580,632,820,293,024,674,775,108,108,379,556,969,217,167,719,353,390,686,441,387,873,659,960,052,953,184,131,541,485,259,420,489,809,104,703,075,959,425,896,863,502,375,984,835,003,229,322,572,803,540,568,603,350,147,194,612,462,763,452,691,222,725,182,351,423,841,973,640,501,538,293,922,000,777,804,580,873,743,425,263,679,968,538,285,307,992,665,283,860,250,514,889,591,845,254,558,909,291,186,378,720,448,197,006,227,625,176,964,205,848,529,800,512,790,077,991,629,583,294,937,030,814,708,014,449,720,825,586,174,410,912,897,546,364,246,244,079,156,707,458,274,605,125,010,659,015,307,501,457,248,901,916,263,564,368,405,025,214,054,399,483,926,338,269,071,528,142,141,283,193,577,135,722,564,286,199,056,749,651,004,433,949,833,615,405,910,074,314,259,656,112,042,312,903,953,310,079,519,577,767,969,325,611,021,205,312,802,177,041,179,402,505,394,719,000,221,214,219,962,591,879,758,626,583,277,167,148,505,030,167,576,369,902,055,384,428,127,482,931,425,307,445,075,418,761,739,656,740,667,262,869,803,570,693,973,751,493,431,612,388,011,244,399,096,497,510,403,738,264,848,597,675,413,660,159,360,085,371,176,217,817,945,955,316,221,452,990,632,458,729,092,233,220,584,044,982,408,688,091,119,328,102,107,197,340,066,574,218,793,880
base10: 893169552902474950329690178817777929717592220738063917315910451757655390738936990062390558847003354439200947371947745552871917864045815599918854437908611406876744489315171313559663016423927804113165332406895041205544312935213461059476482463744416427830809568436204138332644781412716944339201723813319745580632820293024674775108108379556969217167719353390686441387873659960052953184131541485259420489809104703075959425896863502375984835003229322572803540568603350147194612462763452691222725182351423841973640501538293922000777804580873743425263679968538285307992665283860250514889591845254558909291186378720448197006227625176964205848529800512790077991629583294937030814708014449720825586174410912897546364246244079156707458274605125010659015307501457248901916263564368405025214054399483926338269071528142141283193577135722564286199056749651004433949833615405910074314259656112042312903953310079519577767969325611021205312802177041179402505394719000221214219962591879758626583277167148505030167576369902055384428127482931425307445075418761739656740667262869803570693973751493431612388011244399096497510403738264848597675413660159360085371176217817945955316221452990632458729092233220584044982408688091119328102107197340066574218793880
base16: 0xdaeee68d63b9b3f252f57bb5e9c892f200b45919e8fff805345a53828364ed1fcac541f1dee1ddd80584d414901cad981a27d7e9f43b5e498e9018859a61b26f89534c29f3e5fa3de6e21b5e21193793cbbb643869f988e7b649b0b08b0cae6414a8bf670337ba77b0472ff2339b60875e16e03ed0d52042c7867314995b4faf950cced25aa2b29e7d3c1ce7c647ca918c657d5fa34a9fa8e85dafd21c5bbf0ac2a87e8563d14ae589683690ac3ad1fcde06e1e98b25b3eb095e2007a6817d7b8bb753adc8aac5b3adace66afc320027d9003bfb827dfc0dcb1b662909c1f8df85ea502641b5be14da62b00742eeeed2345667676c8001a7f31a7108ace4b8213dc85505d2fa4d770d0dc4d49f8663da3b544d698793f62788836f085c2b5bfb2dade9490676cef6ced921ed1dfc745169847508c05283e27950880a799b9251e330029f391bbceefce05c9c75a02948d0a2fc45d50bf2c6700dca1e7ec59eb4f194765317a5a8dde675c7285cfb3a10c1fbc89f5f27a9262c00dcbac3c3eefd36748e35edbe83fc045dd222a9ed8d25755391f5f84010b3153bc85fbc3207c6b333f2ab242e566dbea450131bb2900fefe714af35e979b58374da64a0ccaf9a4b976536c1cd5554bf65998cd17571f3b12b15378094a7747f679738efd54be2fa9086222acd0effa84115ede7c6ac0e2ddab8006d1860f6aaf9badc5f1f9398

Sample 8192-bit Safe Prime DH params

Safe Prime p (2466 base10 digits):
pretty: 733,700,403,882,364,243,355,879,068,623,828,071,703,490,431,593,186,209,607,801,992,015,411,553,979,959,990,934,679,874,921,409,380,405,700,603,661,764,426,346,988,050,985,635,081,114,068,597,076,921,568,185,340,734,491,268,341,731,757,625,498,451,214,993,183,440,074,185,157,890,585,079,861,324,759,364,842,470,390,017,978,312,590,221,868,178,099,052,819,426,881,127,254,668,559,508,326,531,087,507,412,070,839,466,909,135,595,629,256,225,506,677,796,359,893,579,638,368,970,626,782,393,702,673,502,788,127,848,641,095,096,142,691,287,009,389,951,272,290,286,748,922,330,664,144,081,948,812,499,264,671,950,390,742,593,853,798,898,185,347,731,913,897,926,238,419,441,726,902,604,060,721,613,283,224,726,524,035,836,124,820,156,272,811,642,929,811,423,795,868,617,294,092,524,783,439,675,299,348,312,095,788,763,221,415,331,113,035,583,739,065,078,132,609,091,393,199,065,291,772,055,507,019,801,643,596,430,651,113,456,607,107,466,708,756,778,468,312,461,831,922,271,395,065,649,010,788,783,976,685,534,688,558,577,289,008,129,593,010,621,115,481,664,238,231,406,547,989,444,142,906,185,535,301,177,658,920,766,907,439,123,441,480,805,502,048,076,659,017,759,073,991,440,682,623,126,794,450,803,140,060,812,348,614,175,140,446,254,634,206,632,986,530,675,528,644,908,928,240,101,058,069,482,982,716,555,164,352,300,113,886,553,867,466,942,259,475,508,808,966,697,012,045,849,365,360,233,151,360,183,861,282,910,398,649,852,066,183,843,420,380,296,479,844,480,374,973,941,412,626,094,167,466,990,569,788,922,851,910,553,134,713,606,671,290,759,289,622,294,124,777,516,059,238,210,811,078,785,212,391,506,552,735,945,745,691,299,372,160,583,243,189,925,083,586,140,833,539,191,020,889,394,585,771,570,342,055,957,481,476,565,536,085,403,957,235,745,609,369,633,342,980,056,391,224,422,144,899,138,104,489,565,246,920,276,522,909,356,751,103,115,196,028,894,519,908,633,419,206,027,304,523,102,431,075,868,778,851,335,048,314,368,710,387,977,230,829,180,819,540,746,373,655,755,398,277,515,471,382,565,904,941,587,547,658,589,771,419,434,742,190,502,511,806,461,528,270,056,269,423,195,975,575,282,588,227,641,232,859,253,538,161,430,684,741,759,743,594,706,288,103,984,460,493,888,832,956,476,635,375,352,388,360,078,943,348,053,130,883,269,455,855,029,202,288,759,801,527,677,251,105,472,563,561,973,990,274,106,362,364,629,196,507,234,557,605,897,865,163,098,050,520,325,876,217,487,366,304,263,849,508,446,784,008,652,857,273,030,260,498,923,489,180,939,231,102,007,602,118,080,029,725,981,602,163,764,934,396,753,572,251,865,437,189,405,963,329,677,105,239,343,301,337,533,572,997,685,844,429,717,065,090,095,942,464,602,669,467,645,049,448,130,496,830,208,346,113,238,800,699,014,029,968,050,304,978,781,222,700,650,120,206,684,948,814,480,084,029,169,724,186,133,038,200,868,166,783,926,497,594,549,496,659,367,331,694,261,789,208,620,310,241,109,375,499,140,267,106,407,715,725,603,890,682,862,912,424,105,708,554,894,479,776,392,126,923,148,211,978,520,396,471,456,455,713,751,142,870,099,791,068,376,816,144,456,591,178,418,248,617,973,341,578,979,668,409,806,770,660,677,919,286,486,761,115,718,832,420,780,883,598,741,234,727,256,148,135,803,956,647,704,625,203,645,840,985,333,913,356,265,165,415,457,437,799,799,964,018,737,574,379,062,183,896,411,075,325,225,173,310,140,347
base10: 733700403882364243355879068623828071703490431593186209607801992015411553979959990934679874921409380405700603661764426346988050985635081114068597076921568185340734491268341731757625498451214993183440074185157890585079861324759364842470390017978312590221868178099052819426881127254668559508326531087507412070839466909135595629256225506677796359893579638368970626782393702673502788127848641095096142691287009389951272290286748922330664144081948812499264671950390742593853798898185347731913897926238419441726902604060721613283224726524035836124820156272811642929811423795868617294092524783439675299348312095788763221415331113035583739065078132609091393199065291772055507019801643596430651113456607107466708756778468312461831922271395065649010788783976685534688558577289008129593010621115481664238231406547989444142906185535301177658920766907439123441480805502048076659017759073991440682623126794450803140060812348614175140446254634206632986530675528644908928240101058069482982716555164352300113886553867466942259475508808966697012045849365360233151360183861282910398649852066183843420380296479844480374973941412626094167466990569788922851910553134713606671290759289622294124777516059238210811078785212391506552735945745691299372160583243189925083586140833539191020889394585771570342055957481476565536085403957235745609369633342980056391224422144899138104489565246920276522909356751103115196028894519908633419206027304523102431075868778851335048314368710387977230829180819540746373655755398277515471382565904941587547658589771419434742190502511806461528270056269423195975575282588227641232859253538161430684741759743594706288103984460493888832956476635375352388360078943348053130883269455855029202288759801527677251105472563561973990274106362364629196507234557605897865163098050520325876217487366304263849508446784008652857273030260498923489180939231102007602118080029725981602163764934396753572251865437189405963329677105239343301337533572997685844429717065090095942464602669467645049448130496830208346113238800699014029968050304978781222700650120206684948814480084029169724186133038200868166783926497594549496659367331694261789208620310241109375499140267106407715725603890682862912424105708554894479776392126923148211978520396471456455713751142870099791068376816144456591178418248617973341578979668409806770660677919286486761115718832420780883598741234727256148135803956647704625203645840985333913356265165415457437799799964018737574379062183896411075325225173310140347
base16: 0xac334fb4bf4d29b9e5d2829a34d56aa9098f9f1b158bc76dc2b88732abc99e5a2bb943fa4ca6826c9301ee528152137530777b5118726e6586d301d695b76ec1db70ec19ca505bac9d44b5be635fa5a09415baad681a4a5a6634dfaa4c42eb405f4cb5e3abcd8f80acd2ba7261fb329ba9166f4c4b45ebf6fa597555b694de5db048abd390352facfc9e8965cbbf38a21b36a91fe4f6c9973a63c4988c7abc3f49d641f9b95430a4d7611091615f2eafd420c0fd6d0cec1834f18568df1835ce8117b9d9a03a1a9bb05172f6de0d0b5637e1f1c9766bcd8524ff46d57f1260f09f5b51fa229ad265149a5cf1f3387304640b4b6928d215f6f2ff92b2bc453df05b5c8471e2fd3d048be2bfda382d692b45b7dffc33cb237dcb48aa0b65906db2206d42f5d082a078b7a2b5a119f941131637e895379f647bfeb363b97cdb0091ca86887dd3f414c985be179674d82a9988123fb0af3b90476a57e7f99b0f99cd5458fc2a0b306a64672da682812f2de94ddfcb676e55d851c17080cf0e35209ffb2325cdf9a460534509d7c9c808528cd9560cfd65fad2830307a79ffc9bba37d84d1c72807b07723bb40fb84d07f4d699617c20ba5f9aa5e10406926ebbe3cccd49ed9330a81a2b5fb3727cdd52987c95ec814bf84610aba081dc6c8fada0a8aa654c85566d11c3cdd9d83af9cd63a21b2ccec3700c5a1ad12cf4f39215ab407e666ab448cd9308cf7397c6f05f51ce557dae621a965f8bdeb866aa97d4c4d684f27e47096cc6919bdf36d525abaa17d25765fa68d9a4458cfe46b0337c5ce0c59cb72499b68e8534e40d1e2ba244fdf831234d563bcf840849fb7b8d760834122c16507f56f2487aced417a832b50b18306e269b05423b174420f6bab159c40428bd7fda8947a6579b2feb850d725487deae672c42096eea70d77e06ee6d5d8e7a91d5e168e60a82378904afbc74aa747e0eca08741167cbe002f320db3d85bc2dadb1bb8c48aa71e5a8ca1bc72fdf17aa42832af482d85f31ecc8868c5ba6e7b8be2b2643f0b8d2979ab077dbb94cc17e4a971c07deaf8068bf5fa3cee5b641a5836b91c985ca63355274fbde18baa3a30fb4064bbc0a4bb4d1092b984cb0a056827b2f1aa100d572299e802ab2bcc1a596cd0875e40ba0c561d07ecbcf36cae682dadd2c4a1a7ea96112b219c45588aa34b802db75bcead485d72053ebc2a81a5d888a10e5fd97bf3f79aa29d4e462bcdfede24f4ffb5398d3fc8b73ace220918da86b423dbd2cf838706b8792cbec3f2c9d8f87d2c8af4f396fc56d6ca4c0a3b35bd38b0a4ac9264a064b11ca551c361481ecc36f93ad7bc0202a45e63fa254f7fcb7e681c7401b18b6e7f696820d1be9275c73818bdd0a94c3746af835187e5ae8b20c01774b9c6ccbae1e69cd93d89be28d2725b2eec77807bc566fbb

Sophie Germain Prime q (2466 base10 digits):
pretty: 366,850,201,941,182,121,677,939,534,311,914,035,851,745,215,796,593,104,803,900,996,007,705,776,989,979,995,467,339,937,460,704,690,202,850,301,830,882,213,173,494,025,492,817,540,557,034,298,538,460,784,092,670,367,245,634,170,865,878,812,749,225,607,496,591,720,037,092,578,945,292,539,930,662,379,682,421,235,195,008,989,156,295,110,934,089,049,526,409,713,440,563,627,334,279,754,163,265,543,753,706,035,419,733,454,567,797,814,628,112,753,338,898,179,946,789,819,184,485,313,391,196,851,336,751,394,063,924,320,547,548,071,345,643,504,694,975,636,145,143,374,461,165,332,072,040,974,406,249,632,335,975,195,371,296,926,899,449,092,673,865,956,948,963,119,209,720,863,451,302,030,360,806,641,612,363,262,017,918,062,410,078,136,405,821,464,905,711,897,934,308,647,046,262,391,719,837,649,674,156,047,894,381,610,707,665,556,517,791,869,532,539,066,304,545,696,599,532,645,886,027,753,509,900,821,798,215,325,556,728,303,553,733,354,378,389,234,156,230,915,961,135,697,532,824,505,394,391,988,342,767,344,279,288,644,504,064,796,505,310,557,740,832,119,115,703,273,994,722,071,453,092,767,650,588,829,460,383,453,719,561,720,740,402,751,024,038,329,508,879,536,995,720,341,311,563,397,225,401,570,030,406,174,307,087,570,223,127,317,103,316,493,265,337,764,322,454,464,120,050,529,034,741,491,358,277,582,176,150,056,943,276,933,733,471,129,737,754,404,483,348,506,022,924,682,680,116,575,680,091,930,641,455,199,324,926,033,091,921,710,190,148,239,922,240,187,486,970,706,313,047,083,733,495,284,894,461,425,955,276,567,356,803,335,645,379,644,811,147,062,388,758,029,619,105,405,539,392,606,195,753,276,367,972,872,845,649,686,080,291,621,594,962,541,793,070,416,769,595,510,444,697,292,885,785,171,027,978,740,738,282,768,042,701,978,617,872,804,684,816,671,490,028,195,612,211,072,449,569,052,244,782,623,460,138,261,454,678,375,551,557,598,014,447,259,954,316,709,603,013,652,261,551,215,537,934,389,425,667,524,157,184,355,193,988,615,414,590,409,770,373,186,827,877,699,138,757,735,691,282,952,470,793,773,829,294,885,709,717,371,095,251,255,903,230,764,135,028,134,711,597,987,787,641,294,113,820,616,429,626,769,080,715,342,370,879,871,797,353,144,051,992,230,246,944,416,478,238,317,687,676,194,180,039,471,674,026,565,441,634,727,927,514,601,144,379,900,763,838,625,552,736,281,780,986,995,137,053,181,182,314,598,253,617,278,802,948,932,581,549,025,260,162,938,108,743,683,152,131,924,754,223,392,004,326,428,636,515,130,249,461,744,590,469,615,551,003,801,059,040,014,862,990,801,081,882,467,198,376,786,125,932,718,594,702,981,664,838,552,619,671,650,668,766,786,498,842,922,214,858,532,545,047,971,232,301,334,733,822,524,724,065,248,415,104,173,056,619,400,349,507,014,984,025,152,489,390,611,350,325,060,103,342,474,407,240,042,014,584,862,093,066,519,100,434,083,391,963,248,797,274,748,329,683,665,847,130,894,604,310,155,120,554,687,749,570,133,553,203,857,862,801,945,341,431,456,212,052,854,277,447,239,888,196,063,461,574,105,989,260,198,235,728,227,856,875,571,435,049,895,534,188,408,072,228,295,589,209,124,308,986,670,789,489,834,204,903,385,330,338,959,643,243,380,557,859,416,210,390,441,799,370,617,363,628,074,067,901,978,323,852,312,601,822,920,492,666,956,678,132,582,707,728,718,899,899,982,009,368,787,189,531,091,948,205,537,662,612,586,655,070,173
base10: 366850201941182121677939534311914035851745215796593104803900996007705776989979995467339937460704690202850301830882213173494025492817540557034298538460784092670367245634170865878812749225607496591720037092578945292539930662379682421235195008989156295110934089049526409713440563627334279754163265543753706035419733454567797814628112753338898179946789819184485313391196851336751394063924320547548071345643504694975636145143374461165332072040974406249632335975195371296926899449092673865956948963119209720863451302030360806641612363262017918062410078136405821464905711897934308647046262391719837649674156047894381610707665556517791869532539066304545696599532645886027753509900821798215325556728303553733354378389234156230915961135697532824505394391988342767344279288644504064796505310557740832119115703273994722071453092767650588829460383453719561720740402751024038329508879536995720341311563397225401570030406174307087570223127317103316493265337764322454464120050529034741491358277582176150056943276933733471129737754404483348506022924682680116575680091930641455199324926033091921710190148239922240187486970706313047083733495284894461425955276567356803335645379644811147062388758029619105405539392606195753276367972872845649686080291621594962541793070416769595510444697292885785171027978740738282768042701978617872804684816671490028195612211072449569052244782623460138261454678375551557598014447259954316709603013652261551215537934389425667524157184355193988615414590409770373186827877699138757735691282952470793773829294885709717371095251255903230764135028134711597987787641294113820616429626769080715342370879871797353144051992230246944416478238317687676194180039471674026565441634727927514601144379900763838625552736281780986995137053181182314598253617278802948932581549025260162938108743683152131924754223392004326428636515130249461744590469615551003801059040014862990801081882467198376786125932718594702981664838552619671650668766786498842922214858532545047971232301334733822524724065248415104173056619400349507014984025152489390611350325060103342474407240042014584862093066519100434083391963248797274748329683665847130894604310155120554687749570133553203857862801945341431456212052854277447239888196063461574105989260198235728227856875571435049895534188408072228295589209124308986670789489834204903385330338959643243380557859416210390441799370617363628074067901978323852312601822920492666956678132582707728718899899982009368787189531091948205537662612586655070173
base16: 0x5619a7da5fa694dcf2e9414d1a6ab55484c7cf8d8ac5e3b6e15c439955e4cf2d15dca1fd265341364980f72940a909ba983bbda88c393732c36980eb4adbb760edb8760ce5282dd64ea25adf31afd2d04a0add56b40d252d331a6fd5262175a02fa65af1d5e6c7c056695d3930fd994dd48b37a625a2f5fb7d2cbaaadb4a6f2ed82455e9c81a97d67e4f44b2e5df9c510d9b548ff27b64cb9d31e24c463d5e1fa4eb20fcdcaa18526bb08848b0af9757ea10607eb686760c1a78c2b46f8c1ae7408bdcecd01d0d4dd828b97b6f0685ab1bf0f8e4bb35e6c2927fa36abf8930784fada8fd114d69328a4d2e78f99c39823205a5b494690afb797fc9595e229ef82dae4238f17e9e8245f15fed1c16b495a2dbeffe19e591bee5a45505b2c836d91036a17ae841503c5bd15ad08cfca0898b1bf44a9bcfb23dff59b1dcbe6d8048e543443ee9fa0a64c2df0bcb3a6c154cc4091fd8579dc823b52bf3fccd87cce6aa2c7e15059835323396d341409796f4a6efe5b3b72aec28e0b84067871a904ffd9192e6fcd23029a284ebe4e40429466cab067eb2fd69418183d3cffe4ddd1bec268e39403d83b91dda07dc2683fa6b4cb0be105d2fcd52f0820349375df1e666a4f6c998540d15afd9b93e6ea94c3e4af640a5fc230855d040ee3647d6d0545532a642ab3688e1e6ecec1d7ce6b1d10d966761b8062d0d68967a79c90ad5a03f33355a2466c98467b9cbe3782fa8e72abed7310d4b2fc5ef5c33554bea626b42793f2384b66348cdef9b6a92d5d50be92bb2fd346cd222c67f235819be2e7062ce5b924cdb47429a72068f15d1227efc1891a6ab1de7c20424fdbdc6bb041a09160b283fab79243d676a0bd4195a858c1837134d82a11d8ba2107b5d58ace202145ebfed44a3d32bcd97f5c286b92a43ef5733962104b775386bbf037736aec73d48eaf0b47305411bc48257de3a553a3f0765043a08b3e5f00179906d9ec2de16d6d8ddc6245538f2d4650de397ef8bd52141957a416c2f98f66443462dd373dc5f159321f85c694bcd583beddca660bf254b8e03ef57c0345fafd1e772db20d2c1b5c8e4c2e5319aa93a7def0c5d51d187da0325de0525da688495cc2658502b413d978d50806ab914cf4015595e60d2cb66843af205d062b0e83f65e79b6573416d6e96250d3f54b089590ce22ac4551a5c016dbade756a42eb9029f5e1540d2ec4450872fecbdf9fbcd514ea72315e6ff6f127a7fda9cc69fe45b9d6711048c6d435a11ede967c1c3835c3c965f61f964ec7c3e96457a79cb7e2b6b6526051d9ade9c58525649325032588e52a8e1b0a40f661b7c9d6bde0101522f31fd12a7bfe5bf340e3a00d8c5b73fb4b41068df493ae39c0c5ee854a61ba357c1a8c3f2d74590600bba5ce3665d70f34e6c9ec4df1469392d97763bc03de2b37dd

Generator g:
3

Example 8192-bit DH exchange

Alice's Secret a = 512 bit random number (155 base10 digits):
pretty: 11,103,899,175,180,269,211,112,183,496,210,505,303,440,378,535,611,896,832,996,020,197,570,904,214,106,344,604,022,603,288,934,759,663,731,899,913,331,129,630,720,578,746,322,820,639,582,180,246,823,009,736
base10: 11103899175180269211112183496210505303440378535611896832996020197570904214106344604022603288934759663731899913331129630720578746322820639582180246823009736
base16: 0xd402ba84adea7b6b66eb9cdd2f8917940d84442f7a5e3b86fb5c980b013677ca52638c371bc99fc5baa315247ef5bce29b8f95c86ac4c50d315d195a943e7dc8

Alice's Public A = g**a mod p (2466 base10 digits):
pretty: 137,499,453,732,598,203,485,722,724,856,533,657,630,490,810,781,393,873,288,602,709,715,597,263,432,242,070,425,169,089,102,634,007,616,558,832,211,207,871,368,018,914,416,943,328,095,111,645,931,767,357,277,922,846,937,445,838,326,067,899,899,470,139,135,189,877,795,470,499,597,810,396,293,660,903,729,209,042,915,597,984,698,766,678,022,866,410,077,257,631,463,330,347,618,100,380,541,121,618,850,013,107,876,676,637,173,675,394,957,941,593,324,008,603,807,232,812,227,419,669,562,031,944,902,326,149,299,979,819,812,260,907,619,069,080,125,632,453,073,341,946,147,582,814,108,453,933,018,229,710,711,536,877,858,513,512,299,921,778,503,861,103,707,535,367,846,350,817,541,945,791,186,242,264,717,105,450,032,015,121,228,883,311,310,554,307,642,616,992,497,302,908,694,717,592,433,141,297,144,432,050,368,735,795,242,641,458,340,179,574,570,677,363,094,613,194,407,659,029,479,144,680,817,795,360,430,138,274,949,852,590,078,525,956,271,272,097,617,504,628,863,359,082,722,165,988,051,428,984,350,284,590,945,634,257,023,992,112,109,603,037,913,743,881,093,449,074,739,596,518,025,367,431,357,728,010,078,740,547,844,427,806,945,121,817,630,026,106,069,016,395,628,443,335,874,134,782,223,303,836,066,466,169,610,185,611,500,914,573,834,453,767,768,700,836,697,312,298,170,873,610,903,296,071,503,436,737,775,921,179,256,883,399,734,879,952,729,442,650,214,051,716,136,162,200,565,973,531,954,800,456,343,630,305,569,794,075,157,594,061,975,830,241,309,175,110,342,403,848,770,459,253,822,108,620,055,847,537,863,112,088,953,128,637,896,629,672,657,973,454,415,069,780,665,891,387,271,359,676,420,696,094,880,725,186,108,618,297,986,550,327,395,638,179,845,946,378,371,811,775,850,249,289,852,460,431,576,998,607,184,804,764,865,455,013,595,954,142,610,967,661,806,410,362,224,594,614,800,402,524,713,334,562,398,344,216,220,581,763,873,682,384,606,166,610,604,087,656,154,832,140,923,257,965,683,768,548,028,426,257,913,893,938,075,218,051,784,056,598,869,906,431,914,676,951,171,366,763,803,312,262,722,115,100,832,954,533,306,894,248,256,469,990,901,257,248,810,156,536,808,436,047,935,297,348,759,162,789,618,289,556,994,856,258,007,070,748,274,613,561,558,988,878,973,286,485,214,901,474,312,469,472,851,917,293,326,915,087,133,466,910,661,065,483,827,540,350,325,735,017,648,347,645,483,358,455,553,932,098,063,886,086,089,832,918,391,816,577,731,474,146,242,897,081,650,327,342,629,517,247,329,512,555,799,718,613,152,621,351,015,780,248,414,663,836,212,772,350,248,797,416,726,557,930,308,465,349,936,931,637,914,677,470,247,117,736,671,011,323,370,094,555,428,428,003,694,896,986,812,165,443,724,331,662,841,353,222,117,709,106,536,768,632,436,807,694,114,348,998,425,092,314,975,151,514,349,902,761,822,641,392,758,958,228,200,580,418,449,051,260,129,472,760,424,748,785,116,212,617,553,832,462,993,604,380,017,155,996,498,328,159,332,602,314,656,558,068,420,231,439,621,189,533,513,479,647,688,540,985,812,602,871,732,045,710,938,561,302,942,032,005,728,847,351,542,772,286,352,401,345,746,248,868,174,486,971,824,954,342,522,014,596,143,265,833,726,781,848,858,981,404,642,172,075,323,751,892,847,438,407,062,717,678,257,192,175,539,339,295,868,153,593,811,648,146,623,562,313,220,546,978,665,451,442,286,522,711,883,592,593,546,980,382,891,314,918,154,277,229,422,912,908
base10: 137499453732598203485722724856533657630490810781393873288602709715597263432242070425169089102634007616558832211207871368018914416943328095111645931767357277922846937445838326067899899470139135189877795470499597810396293660903729209042915597984698766678022866410077257631463330347618100380541121618850013107876676637173675394957941593324008603807232812227419669562031944902326149299979819812260907619069080125632453073341946147582814108453933018229710711536877858513512299921778503861103707535367846350817541945791186242264717105450032015121228883311310554307642616992497302908694717592433141297144432050368735795242641458340179574570677363094613194407659029479144680817795360430138274949852590078525956271272097617504628863359082722165988051428984350284590945634257023992112109603037913743881093449074739596518025367431357728010078740547844427806945121817630026106069016395628443335874134782223303836066466169610185611500914573834453767768700836697312298170873610903296071503436737775921179256883399734879952729442650214051716136162200565973531954800456343630305569794075157594061975830241309175110342403848770459253822108620055847537863112088953128637896629672657973454415069780665891387271359676420696094880725186108618297986550327395638179845946378371811775850249289852460431576998607184804764865455013595954142610967661806410362224594614800402524713334562398344216220581763873682384606166610604087656154832140923257965683768548028426257913893938075218051784056598869906431914676951171366763803312262722115100832954533306894248256469990901257248810156536808436047935297348759162789618289556994856258007070748274613561558988878973286485214901474312469472851917293326915087133466910661065483827540350325735017648347645483358455553932098063886086089832918391816577731474146242897081650327342629517247329512555799718613152621351015780248414663836212772350248797416726557930308465349936931637914677470247117736671011323370094555428428003694896986812165443724331662841353222117709106536768632436807694114348998425092314975151514349902761822641392758958228200580418449051260129472760424748785116212617553832462993604380017155996498328159332602314656558068420231439621189533513479647688540985812602871732045710938561302942032005728847351542772286352401345746248868174486971824954342522014596143265833726781848858981404642172075323751892847438407062717678257192175539339295868153593811648146623562313220546978665451442286522711883592593546980382891314918154277229422912908
base16: 0x204573e85718e0673dbde92835b867142a88febac93be84d562f3465413f86aa3c74686f44440497f27b7bafac0e351877073726a4e6a418fec98c20458cb460bf110dbb86f450f98edeb2b877a94a56731089f02cf1d712db06daf6e9fe8fd4de7d9a7404381362eb77af45ad9087c5cb4c48816eb7c45c4e38a712db716cf78fb5df961142a5bd21c2e35da2e5378c9e8c6168bc51ef7d31a0f56f1cc4e5bbbfc9733d5addca1f6c4da578a3aa9f577be6039b1fec1fd74912a7d8b9aa925ed7bf4d1b7ad41638d61cde21682758d69e0a3977688831ad481344c217bad115ce2f444f79c685f5b82cfa1be64125d254f07f1120452bb96deae15246f45ea4609cfde9b261d27983186fa24654b558ec9c3fb67d5758f37c92406aea8adc5f9bb70e1eac9ae7a3f2157c9082c073a38ee9a6a01c387d3a86a050a13aa3459ab2d63441e3e5ae8ea9a29ceb6f4d7ea33b20b2135472110410bde6d496d146699984e73223c3e7fd6030c35037ae313b1f8938f2afda245a91defb73bb1708c25cd6d4c71768ec2e9cd4641c0006290a584f1ea3cb1863e77170524fe42b343fac174b998219c94d4a6bcc2692522830487ba467477619892aae83aec2ea3b3699421eca7fe2e079750100438881164f26cd297a8542eb069567be31a69b8ce31b2f393cc940404ed22cef602a5b09bbe900d3b37b7b4c433f6db3b73797072eb1dee770ac7b1e2a6fe3742e25fd0403c5701ff00e9ea78d204c685820830357176f1c94b6f96bc48c6ef472e6131e21017ddd58979e53acc75cb2d742c1ff23d7d892126e82f6872ce3b0570fe0b74155e2070f3da5519a3a254f7a63e12e9779f3035d0df5bd1cebad329e6c2ed43cf953c4d26cfe0aab3c04e3f7a31fc534fd8c7d90a12655cf69b9229a139f46b2bf1629d830fab158176b632e430a848b718afca17decbd4a2d0688bb1d3b9d2351fae9a8f418f018792fc3d58fa49f085e98b2d1c24bd111d6c248616b07f7512bc8a53eeea923b900fc0c7f4a8d5993d9f3b714aca3a7924408f91c937b8d335c9bb2fe25e670c97400fa0d6e3e4deda53e70c20de4ed3ce762421b3f0fc7b3a27230820c96b0f4cc419785e18c32cbc7708bda9706cc2947dbbee7c6fea24f9b468d9a9a2260a3da87ebce5ae445ffb27f456e9f028388a6eddd04e8858e52d568c41fd8d4ec3f38c968449e0126c38cac54b0881264c33e3f9ada3633cc976db9321d2101572c0147e77565aa62774866d4ef69fc942b07f8c77c0e59be8bfa0c526c4bff5bb088de02ccac1e347dd0a48419e2756ccccfe1cf2665dd736ba83000142912e6d18a596306cfb57a66d86ad3f81cd2604427385ae8740ea72f42d96e2fe8270b606481cc0105c25588f59b325055ef092c01a67da66e6ebb2396014e85b80cb8842bad39527c87258c

Bob's Secret b = 512 bit random number (155 base10 digits):
pretty: 11,338,677,985,568,755,589,554,625,848,201,487,813,824,932,497,347,579,420,942,690,134,253,185,812,833,697,529,832,017,368,088,594,649,670,253,922,876,392,484,416,429,152,790,053,488,296,321,770,440,130,590
base10: 11338677985568755589554625848201487813824932497347579420942690134253185812833697529832017368088594649670253922876392484416429152790053488296321770440130590
base16: 0xd87e4db2a93ef894ce1dc2a3d0c176297db743bd826f275fd96436d663eb84b52e717bd0981ad2bcb16fe4d15f34fd60c398f907c4f5b7ef8277c9088e0c801e

Bob's Public B = g**b mod p (2466 base10 digits):
pretty: 326,295,219,675,317,473,788,061,560,816,062,968,080,813,981,270,286,032,992,620,219,344,536,477,852,546,136,714,108,002,715,031,327,974,182,198,827,471,221,969,789,513,389,007,668,676,878,332,424,237,885,478,491,306,146,789,207,214,559,820,584,289,461,715,573,736,495,167,622,936,817,511,855,134,142,517,885,737,187,813,317,298,809,505,757,881,189,076,668,047,016,747,488,868,238,039,657,032,274,126,208,743,533,971,845,300,556,309,547,267,957,055,465,985,011,700,000,282,575,606,755,760,638,237,000,580,947,046,648,872,458,439,775,029,365,650,394,397,221,570,195,069,935,228,335,032,158,830,367,674,428,404,049,179,341,336,598,929,753,869,562,181,274,673,675,243,207,748,317,307,811,501,245,510,561,188,100,274,655,264,369,971,096,686,073,719,528,288,224,066,493,642,022,986,781,294,236,986,740,225,536,420,328,950,497,994,088,108,239,644,090,004,849,984,514,771,976,764,204,382,554,130,207,292,230,854,666,640,937,684,144,338,933,842,382,161,483,740,499,182,333,604,339,225,953,652,116,314,782,302,610,401,582,561,547,265,894,599,182,084,608,379,412,296,529,343,258,861,146,374,865,821,016,860,654,327,393,080,196,363,994,215,825,741,921,635,106,706,665,219,545,415,767,620,064,178,215,556,123,951,661,781,809,491,749,635,004,462,372,230,916,966,762,977,941,838,552,204,120,637,211,043,415,889,357,539,546,126,457,940,956,544,910,406,875,088,534,143,221,193,146,511,249,691,690,129,184,104,895,907,559,228,540,470,316,844,989,320,011,421,919,708,813,236,942,413,249,961,910,014,371,871,841,675,379,269,908,755,913,815,351,327,887,408,074,986,609,959,839,245,698,451,746,819,550,672,887,829,847,554,894,763,267,261,419,002,771,745,265,848,812,446,631,109,953,478,200,127,012,369,103,416,309,569,228,260,101,489,359,802,698,558,923,591,736,879,776,223,619,390,413,730,359,198,749,027,219,882,426,675,654,372,361,905,089,196,175,974,392,343,820,710,867,251,050,013,657,908,033,947,998,761,993,688,025,361,658,455,179,397,809,773,687,329,493,090,699,322,827,558,426,912,163,294,496,606,783,779,486,050,805,616,969,702,688,976,711,435,093,107,353,650,002,639,588,137,359,792,454,148,067,842,379,747,020,224,378,655,217,714,194,864,867,066,203,453,417,196,791,043,528,954,568,375,831,935,864,717,571,604,749,389,901,153,940,927,891,529,995,654,625,041,857,227,411,126,824,868,922,417,767,622,517,178,299,661,050,057,641,627,584,654,192,982,250,965,796,565,328,478,067,777,468,087,653,516,657,924,095,483,124,586,368,132,543,522,471,517,481,873,493,683,050,478,663,300,820,662,124,904,154,110,748,253,149,916,804,874,301,881,214,657,082,367,559,733,576,019,936,345,028,261,099,406,763,615,232,574,150,548,628,798,763,853,592,836,765,404,715,412,163,960,574,154,382,534,016,019,541,073,563,401,844,182,296,405,399,569,088,569,502,464,173,666,255,228,643,774,612,123,507,663,047,751,909,318,605,048,622,518,468,194,941,944,875,460,259,496,470,941,342,972,640,036,063,259,474,699,411,531,406,992,538,975,184,304,241,532,293,242,092,990,935,103,658,712,457,922,618,882,733,418,664,539,253,392,379,509,433,523,721,497,580,877,408,572,648,735,318,339,149,247,151,888,278,349,592,486,988,604,057,547,404,242,217,513,243,937,971,430,601,600,613,600,200,691,112,943,688,563,181,558,030,270,487,734,146,935,412,247,350,391,700,393,208,724,903,309,909,016,371,331,862,567,520,815,845,268,201,479,839,948
base10: 326295219675317473788061560816062968080813981270286032992620219344536477852546136714108002715031327974182198827471221969789513389007668676878332424237885478491306146789207214559820584289461715573736495167622936817511855134142517885737187813317298809505757881189076668047016747488868238039657032274126208743533971845300556309547267957055465985011700000282575606755760638237000580947046648872458439775029365650394397221570195069935228335032158830367674428404049179341336598929753869562181274673675243207748317307811501245510561188100274655264369971096686073719528288224066493642022986781294236986740225536420328950497994088108239644090004849984514771976764204382554130207292230854666640937684144338933842382161483740499182333604339225953652116314782302610401582561547265894599182084608379412296529343258861146374865821016860654327393080196363994215825741921635106706665219545415767620064178215556123951661781809491749635004462372230916966762977941838552204120637211043415889357539546126457940956544910406875088534143221193146511249691690129184104895907559228540470316844989320011421919708813236942413249961910014371871841675379269908755913815351327887408074986609959839245698451746819550672887829847554894763267261419002771745265848812446631109953478200127012369103416309569228260101489359802698558923591736879776223619390413730359198749027219882426675654372361905089196175974392343820710867251050013657908033947998761993688025361658455179397809773687329493090699322827558426912163294496606783779486050805616969702688976711435093107353650002639588137359792454148067842379747020224378655217714194864867066203453417196791043528954568375831935864717571604749389901153940927891529995654625041857227411126824868922417767622517178299661050057641627584654192982250965796565328478067777468087653516657924095483124586368132543522471517481873493683050478663300820662124904154110748253149916804874301881214657082367559733576019936345028261099406763615232574150548628798763853592836765404715412163960574154382534016019541073563401844182296405399569088569502464173666255228643774612123507663047751909318605048622518468194941944875460259496470941342972640036063259474699411531406992538975184304241532293242092990935103658712457922618882733418664539253392379509433523721497580877408572648735318339149247151888278349592486988604057547404242217513243937971430601600613600200691112943688563181558030270487734146935412247350391700393208724903309909016371331862567520815845268201479839948
base16: 0x4c94f818417f9e420db6236732b1fa5e85dd4931de0efd4c21a8ee522037779fb9acfd58d0644f9fdee7b798d35b335099fa893e07717e7bcd288b3ddbbfffd43eb3fedee62ac06e87db4d035ec9d4b6e465f0c04e22c871bd3c62dee0b46bc45f66d6febb1bee61b512e47340b1676e1c7252713b91e7d041f8746a1e3cb612fb96461953a9ae57c207f46f839b70be6d873e8e50680c9653db2bebd1ad8a8e2cbc23051a49d1628f28f1b24cdbbc44de05f1d955571e621f45a0f2d775823a6dab41cf9b7854da86e429a79b89379776e7d4a588f728f2ac3770d1a6861da43e0c20f44fd561f329969bde2355ac16df8ce595b6547110ab96776071c6a846c1318d14fa46bb4d6db90d3981428bb240c8e60f01484d7904bcb755923e39db12a80b6a2a08a5c4d8a5205018e680b1bad4399b8bd76bc2c89a7a0ab8c28123e66ca00e40029fe1e6ec9275f0d90423feedbfb6ddf1ecddcf080a8543d8fbd87548ef5cd95e21237907f541c4a90cc5149c53b7f520424309747f55c261901a9d0dedfb9a2798fd9f98828b8917db4bb55aeed0e5bc1999c62d437fc28abf009dbf13cba30bd5f67c81410509cfed4d030dafa0eb9eb50ff9ef4068c12736f67c39689cef009a72305999a4e114e167319706d5af0aaa68ae235f4b1eb6a13f4d6551c4cf3dad1346b39fcf1fdac9bfa0ef9c943b87361a91a28ef89f70dfced0afeb20a9b4c96d6ecf45b08e93fd072ffad67491ad1780e2dad373f6f28bff551515d9067522a3308656d6be1522238443d699a362e21bec926ab5092e353191c48b5bd27bbd7c14ed213601caef35b66a158e66ec291728144ad5f8f87ac1d25f94cb3bcd3fba1878604280eb6ef42db3ee7bf96de7146d16bc81435a5ee8492eac6e2fc98cea5152ceedb79a6b63428780c61f9e661dfe271637b38a0a5bf319247e1d91424d8dba02a7a67ab3f4ed7749f91a959c713f8bb4fd40bb979a1a313964a42876886b81152fa116f72227dac30b24c78030989a809d44305b4c46fd17ee38c8721b7167161f522c62e7aac5d34c7a02fec19e139b66225bdd072511ed6b62171af3e1f759dc39255fce387de967c69f8c90b3293953b51d7b627b16d12428822904b187ec8132da692503cab59a28f4ac18a743ca32cdd264e518a449236d798e3875804b2f0fa0c1e34ee6668e812be9bee3f3879a489963958d9b8cedd3cf21995030546bc421b3f472ee5b243843320922b01844b52ca4d3403099930d0f72758468a7e17da2295df094e72c6ddb657cc208e71567b02db32fee69b8c076c83058420dac1df99cf3cdb5b73a5f5cdcc1319fa4677065d1c9c66fe4bdeaf77cc77176718eaa4f7e844e5c82ed51b97d9a74a86b399a7002da57fdce7c3c6c4e3b604cd406583d347d54809865ef4a65e0858c85150c7fa0cc

Shared Secret s for Alice = B**a mod p:
Shared Secret s for Bob = A**b mod p (2466 base10 digits):
pretty: 390,938,253,543,197,209,695,486,846,893,225,426,180,301,618,970,424,296,759,961,303,579,116,375,070,359,297,265,677,180,681,705,909,209,806,368,280,462,779,559,207,500,302,953,097,506,571,857,661,351,598,994,976,077,800,530,450,360,888,103,031,040,202,110,955,259,763,688,455,661,384,177,928,374,684,916,550,716,631,075,548,333,251,608,461,625,261,294,275,846,791,024,641,465,153,992,525,040,006,795,814,739,824,892,372,483,581,954,040,068,486,463,756,395,074,037,841,661,289,996,608,993,417,652,721,382,679,999,609,870,068,749,676,235,719,994,707,287,869,262,507,019,014,189,406,357,213,729,941,128,082,996,294,502,013,971,263,629,130,204,695,764,723,383,131,224,205,134,891,709,128,926,170,552,102,395,835,984,483,425,943,025,391,083,846,667,459,539,232,571,892,406,556,435,086,383,425,932,648,193,815,285,519,937,446,646,102,806,499,390,777,063,779,000,358,326,724,499,910,017,642,086,687,350,107,971,923,917,838,500,355,844,695,215,182,112,853,927,855,055,944,557,954,998,984,149,222,368,312,803,925,198,243,017,684,668,654,040,667,078,522,688,239,381,742,937,749,862,193,408,525,161,827,456,697,432,396,691,291,390,484,125,457,915,156,618,978,998,299,087,460,546,048,966,765,639,581,766,667,760,969,006,243,677,964,083,751,204,473,665,064,591,357,347,563,740,302,791,860,859,107,733,089,462,507,727,017,970,712,539,668,217,155,727,602,071,078,816,647,592,261,706,470,740,855,111,594,947,000,147,024,779,376,362,301,787,734,349,850,924,273,500,840,304,718,479,860,784,050,186,862,247,997,504,386,312,649,939,543,005,558,166,785,448,019,568,492,571,377,265,417,493,887,851,013,392,438,031,885,541,863,198,262,220,242,709,651,068,426,745,193,023,181,905,166,562,172,738,746,622,603,882,876,334,117,216,881,805,228,562,956,889,637,761,335,156,268,352,210,674,383,977,771,443,476,031,970,036,781,555,466,587,662,070,993,200,201,533,878,686,638,803,105,115,851,814,865,922,335,199,055,158,199,544,616,085,743,930,337,167,485,643,724,313,105,735,097,893,503,008,201,430,922,587,634,846,724,600,226,329,309,886,870,830,015,717,348,398,540,236,364,028,244,423,022,547,415,504,293,271,152,196,126,939,233,594,856,826,657,780,476,175,186,794,636,653,203,153,880,078,449,284,654,308,989,999,338,076,068,562,479,909,551,608,284,401,820,708,611,242,614,764,672,712,891,219,823,574,419,840,977,300,220,148,629,192,296,345,236,323,149,834,792,864,765,852,061,571,343,544,541,288,726,587,197,116,495,819,338,023,710,920,699,697,227,823,226,244,887,832,442,058,943,393,154,878,004,282,748,307,220,178,456,579,750,507,736,854,724,948,348,872,667,437,712,934,426,169,382,051,220,021,883,416,287,329,820,325,519,480,042,465,787,609,789,870,270,638,776,097,993,496,526,943,995,785,259,959,949,046,026,993,154,096,774,119,643,510,586,574,129,341,118,780,958,734,001,432,521,485,293,142,853,025,358,692,650,111,423,872,077,374,300,676,639,299,017,281,014,684,147,062,869,369,738,578,272,843,886,809,577,362,172,636,558,485,083,946,265,034,242,896,249,474,634,977,186,143,156,871,199,996,128,673,515,330,220,442,684,562,676,147,367,412,623,975,699,989,741,078,227,303,226,315,634,683,315,806,772,116,100,613,327,531,324,366,676,378,847,604,329,496,336,709,432,815,428,654,011,593,965,278,913,556,104,975,774,652,039,547,789,695,043,295,307,297,454,738,543,403,363,141,971,631,928,829,150,384,070,253,278,033
base10: 390938253543197209695486846893225426180301618970424296759961303579116375070359297265677180681705909209806368280462779559207500302953097506571857661351598994976077800530450360888103031040202110955259763688455661384177928374684916550716631075548333251608461625261294275846791024641465153992525040006795814739824892372483581954040068486463756395074037841661289996608993417652721382679999609870068749676235719994707287869262507019014189406357213729941128082996294502013971263629130204695764723383131224205134891709128926170552102395835984483425943025391083846667459539232571892406556435086383425932648193815285519937446646102806499390777063779000358326724499910017642086687350107971923917838500355844695215182112853927855055944557954998984149222368312803925198243017684668654040667078522688239381742937749862193408525161827456697432396691291390484125457915156618978998299087460546048966765639581766667760969006243677964083751204473665064591357347563740302791860859107733089462507727017970712539668217155727602071078816647592261706470740855111594947000147024779376362301787734349850924273500840304718479860784050186862247997504386312649939543005558166785448019568492571377265417493887851013392438031885541863198262220242709651068426745193023181905166562172738746622603882876334117216881805228562956889637761335156268352210674383977771443476031970036781555466587662070993200201533878686638803105115851814865922335199055158199544616085743930337167485643724313105735097893503008201430922587634846724600226329309886870830015717348398540236364028244423022547415504293271152196126939233594856826657780476175186794636653203153880078449284654308989999338076068562479909551608284401820708611242614764672712891219823574419840977300220148629192296345236323149834792864765852061571343544541288726587197116495819338023710920699697227823226244887832442058943393154878004282748307220178456579750507736854724948348872667437712934426169382051220021883416287329820325519480042465787609789870270638776097993496526943995785259959949046026993154096774119643510586574129341118780958734001432521485293142853025358692650111423872077374300676639299017281014684147062869369738578272843886809577362172636558485083946265034242896249474634977186143156871199996128673515330220442684562676147367412623975699989741078227303226315634683315806772116100613327531324366676378847604329496336709432815428654011593965278913556104975774652039547789695043295307297454738543403363141971631928829150384070253278033
base16: 0x5bc0f36d1f9cc869d0bab10017c364156a5fe0a07b011b283cbdc13c3a5c73d2548048e2780b39d3fe1b972c47e6f4952bbad77151011dd47ec515ff95e1add16a3284544608bf39301e68e673ff307b4c7f7f298eb7846a47af6ec60ab9fac13b9a8d1982e1a6b872ce4636bdd0fd75479c07134126ab8d7b37787ef8192d57a7caa0bfa9f8cde8d4c1270dcff7fb02bf80aa9e381e78ef1103784d02078b766f1f3599d7724be63ee989c251deb2213b92a06d3d470218d4d644fb98c00c0043a4773db0a2a51497ea7fd99f169196a886efa729ab53c1940400c941a35f8e0cb2d7122cf6028455f3d64d9f75e5a2aa5364a8aac86cfa1de57f374edd16b06d4ef1da1bf69fe03f2f4cdcea99fed8cb0942069e9fa9fb9f9ecfc5c7b93174f82754b3001175eb5fa8af44254cfefea337d392247f8f8a0bdc36b6c1bb0f15d48444764af557782d6ea10df68ac789a28d3fb8e9d62e92f5bde5667a182f0c66272c04359b052bfa5cd8b71f37662c032360e27d16ff43948c2f6e633bf418433a0de44dbd347f9fe79b8b736dd997b488172b39ff9c8e112ccb9400b3004414438760131a656c4cdbb38d1842c02d7c220762edfd1686b767b6cc3537bf9f1964199b552031c0e3ded5cf7979687bb40ee4da197cc69518b38c5a300634aa8b4df99d463a11083930fc4c7d7f95cd7dcdf55933306e4cb28b80ff1dd55438791bc7f96cbfaf9eed457f976384f4b97bec5a72b2a73c0711671c900cf6c4ffec9b47a631d3e18364c2ac785938ae8f6a002af099f26db3cb7197bdf40a37a86faae208e70eb6bcd8a54a2301c07aa2058868e648e4824610f11f25a7ab65e7542492429f86e0acf24092f2db6586416e2c87148cb9c08e46174afc25e9f020cc1a1ac713b87518351ca9d21567f50f2be1864393f3e6ee7f3514cb5cf85db69b26faaf3f41e792ffef4cdfa8225baddb0ee1a280fe38e2e08f2a8679ce48d49ccc7a54fbf675c85a3b981f8a3019c6fc1f1527bb14e6d890c8208e76184aba4f5cb698fe625be4dfc995f2ff40d924de8950cb7e6975f307063e60f125b506cbb41d98540dde7a4de3087c1d4640cb1af2a602d251f30d43c047353f88ca6137f1d9f65a9e4db5f925b8c40ca4d27a8c8691deef72559aef0182067eaed0212413d582c2092f2cf46684528c8e9869f5e21db83ca90cba94a336b8038a6b3136c5ae1991a5003e48e16d21737f4c78b49cb7d39e9d3e70531efcc26700cc94e8883f3b00f89764d55fe433faacdfdf9c6f0e8ffcab5c11a7f1dc3773ea35b1c465b6607172a4033f1c825fc0b8b402b04c6f59ae80abaf00b7b0dd1fe42fbc2c8af094ceda1e96d2581ab2cc5bea84cf16125e37f97c671da679d7fc341b01e6722c8d9c3098757cb81069574a2e16b05c5058abcb430c6bea642f0126f351