Blackjack Rsa Meaning
Blackjack terms / Abbreviations; RSA = Re-Splitting Aces is allowed ESR = Early Surrender LSR = Late Surrender O/U = Over/Under 13 side bets are allowed. TABLE GAME MANAGEMENT FOR THE SMALL CASINO, PART 1 Bill Zender H; Re-splitting aces is also a customer-friendly rule and costs the casino 0.06 percent. RSA – This refers to the player’s ability to resplit aces after an initial splitting of aces. If you split a pair of aces and get a third ace, you want to be able to split that into a third hand. If you split a pair of aces and get a third ace, you want to be able to split that into a third hand.
- Blackjack Rsa Meaning Pertaining
- Blackjack Rsa Meaning Examples
- Blackjack Rsa Meaning Slang
- Blackjack Rsa Meaning Synonyms
- Jul 11, 2019 RSA – This refers to the player’s ability to resplit aces after an initial splitting of aces. If you split a pair of aces and get a third ace, you want to be able to split that into a third hand. If you split a pair of aces and get a third ace, you want to be able to split that into a third hand.
- Browse the list of 20 Blackjack abbreviations with their meanings and definitions. List of most popular Blackjack terms updated in July 2020.
- Blackjack is a game full of terms you won’t find anywhere else, so it pays to learn all of the most common blackjack terminology before you play for real. How well do you know your blackjack terms and rules? If you don’t know your true count from your running count, or you confuse your DAS with your RSA, you’re in the.
The generation of random numbers is too important to be left to chance.
Everything we do to achieve privacy and security in the computer age depends on random numbers.
In February 2012, two groups of researchers revealed that large numbersof RSA encryption keys that are actively used on the Internet can be crackedbecause the random numbers used to generate these keys were not random enough.Here, I offer a puzzle in which you will identifyand crack RSA keys that are vulnerable in the same way — usinga slightly simpler version of the same technique. This should providea clearer understanding of how this problem arises and how it can beexploited, as well as more familiarity with the RSA algorithm andEuclid's algorithm.
This challenge is aimed at novice programmers who want to practice theirprogramming skills with some real-world cryptography, and at anyone whowas interested in Lenstra et al. and Heninger et al.'sresearch but found the math involved daunting or unfamiliar.
I'll start with an explanation about RSA to put these attacks in somecontext and explain some of the steps involved in solving this challenge.If you're already familiar with the RSA algorithm and with the details ofthese attacks, you could skip directly to thechallenge part.
RSA and RSA keys
RSA is animportant encryption technique first publicly invented by Ron Rivest,Adi Shamir, and Leonard Adleman in 1978. RSA is based onthefact that there is only one way to break a given integer down into aproduct of prime numbers, and a so-calledtrapdoor problemassociated with this fact. It's easy to fall through a trap door, butpretty hard to climb up through it again; remember what the Sybil said:
[...] Sate sanguine divom, Tros Anchisiade, facilis descensus Averno; noctes atque dies patet atri ianua Ditis; sed revocare gradum superasque evadere ad auras, hoc opus, hic labor est. | O goddess-born of great Anchises' line, The gates of hell are open night and day; Smooth the descent, and easy is the way: But to return, and view the cheerful skies, In this the task and mighty labor lies. John Dryden translation |
The particular problem at work is that multiplication is pretty easyto do, but reversing the multiplication — in the form offactoring — is apparently pretty hard. Multiplying given numbersp and q together to calculate p × q = n is pretty straightforward; evenelementary school children are taught to do it quickly and accurately bylong multiplication.
For example, if I asked you to multiply
17477852958781876547 × 15241555427044345769 = ?
you would probably need only a matter of minutes with pencil and paper,or a tiny fraction of a second with a computer, to answer
17477852958781876547 × 15241555427044345769 = 266389664617004986624097978187739779643
What if we turn the question around and ask what two integers would have tobe multiplied together to yield a given number? For example,
? × ? = 281512008712700373730275954373439628511
Suddenly, this task is remarkably difficult; you'd have little hope ofever getting the answer by guessing with pencil and paper, and even witha computer you might have to write a new program to find the answer, andit might take a noticeable amount of time to do so.
However, if I reveal that the answer is
17627949842247424607 × 15969639761398924673 = 281512008712700373730275954373439628511
you can pretty easily check that this is right. If you need moreconvincing that it seems to be vastly harder to go in one direction thanthe other, try these two problems without answers:
18324413790489873917 × 16753053665517997013 = ?
and
? × ? = 231780035703803150278713557377368328099
It seems as though thispattern continues, and factoring gets drastically harder as the numbersinvolved get larger, while multiplication remains easy and quick. Infact, there is alsoa longstanding publicchallenge to see what the public state-of-the art in factorizationis; the largest number from this challenge that we know has beensuccessfully factored is called RSA-768:
1230186684530117755130494958384962720772853569595334792197322452151726400507263657518745202199786469389956474942774063845925192557326303453731548268507917026122142913461670429214311602221240479274737794080665351419597459856902143413
This number wasfactored in 2009.
The RSA algorithm requires a user to generate a key-pair, made up ofa public key and a private key, using this asymmetry. Descriptions ofRSA often say that the private key is a pair of large prime numbers(p, q), while the public key is their product n =p × q.
This is almost right; in reality there are alsotwo numbers called d and e involved; e, which isused for encryption, is usually 65537, while d, which isused for decryption, is calculated from e, p, andq. Thewaywe calculate d is straightforward to do but complicatedto explain, and isn't really necessary for our purposes here. (Below, I'llgive you some source code and a web app to automate theprocess so that you don't have to worry about it while solving the puzzle.)The end result is that d can be used to decrypt what e and nencrypt (using an operation called modular exponentiation), but only the privatekey's owner knows or can calculate d.
n is, indeed, published as part of the public key. Not onlyis the public allowed to know this number, butforsecurity reasons the public key holder normally wants everyoneto know it, to prevent someone else from maliciouslyimpersonatingthem by giving out some other value of n. We can goout and look at various people's values of n; for example, the onefor Gmail's web site is
149629486786262270606941307578089677590454201237165984499971154966664749889451716079416569797686937215029720424638195271847598792512505659659231590931086898924727016171274343552925314345847614671125708664971820722165639121705555274122142443910339820898963056278550522067594972363524619215467622112312405988881
while the one for PayPal's site is
19907789316973232571709388139491358666929454999402440962751418618453573264955089051420528817897891333335369381181336604286912201113757821941217467558226280838933785489616679977332178809112857355692902776754821604616983317242449495394362748115124468692900781573694743868331219952099224674513107154770709045556420165907683219901455612366432477179986702075209386343768097176233191423040304881401194366954739922445951906916747808916845352010407952710079897810642551273099204890952309865459288708489866066485327182895626969651191379209124433725745943676165198426636198495665286419097106110163852891072181715030605705150303and the one for my personal PGP key is
841830189554902721026006247739546136972965192471626247977764884021366211646187218566132448714004885377620185548223422340601988826804509137147032448959910142115764781536356204447761007580008144976199114921726189821417073455544018343258566314495155851812943917059509251624573769228326103339174756977227004234908037261820401559891529292401492294318195891462181470230511604900474900369487289553629406704242993600242722070800406980780844796229725986193848454617142126130131167449066184602200647652183599709700856812818193726633985875223123937954937132465999345756946913831088715133719385754842563580309058257069600517458107079776422294546503823491398091344170845182023322246313898566638535675251876671770245660947069378135279874832897589085116024670809119607486716639679696733616083424544208558178827551260313382038813901934220133099033018834092461182915944039053087293914760635765293188692579571603359367310242573040123690679683819755198169944851146610422501871503131104491545007261393012502280296487624970413618417667666973500052145407349662949917909076069310778888044252064069693533225082164862151549043821770529863261805530137680317702528710599585489814981886953830818713342582822172828250328044826810492554717158257398231414402612929
(Yow! My key is pretty long, but that doesn't mean my personal e-mail is more secure overall thanPayPal, because this won't do me much good if someone breaks into mycomputer's operating system. It just may mean I'm being extravagant.Gene Spafford once remarked that using such strong encryption on theInternet could be 'the equivalent of arranging an armored car to delivercredit-card information from someone living in a cardboard box to someoneliving on a park bench'. My computer could be the equivalent of the parkbench.)
It's reasonable to say that the security of RSA is based onkeeping p and q secret, and on its beingjust too hard to figure them out from n by factorizing it.If you can find the factors of any of the last three numbers above, youcan break the security of that key and of some of the private datathat it protects. Notice that if someone turned up claiming to have brokenone of these keys, you could easily check their solution was right bymultiplying the factors.
Cracking keys with gcd
Blackjack Rsa Meaning Pertaining
Although factorization seems like a very hard problem, there's adifferent problem that's much easier — finding thegreatestcommon divisor ('gcd') of two numbers. This means the largest integerthat both of the numbers are divisible by.
A few examples:
gcd(6, 9) = 3
gcd(10, 12) = 2
gcd(10, 30) = 10
gcd(100, 144) = 4
gcd(3, 7) = 1
What's gcd(15, 18)? What's gcd(1000, 3)?
One interesting observation is that gcd(p, q) is always 1 if pand q are prime. However, gcd(x, y) can also be 1 if x andy are not prime but just don't have any divisors in common. Forexample, gcd(16, 27) = 1 because there is no other number that 16 and 27are both divisible by. So 16 and 27 are called relatively prime to each other.
There is a very ancient and very fast method for calculating gcd, evenfor extremely large numbers. I'll describe this method in detail inanother section below. One important fact about it is that, even thoughfactorization seems very hard and slow, calculating gcd is very fast andeasy. What does that mean for cracking RSA keys?
Suppose there are four different primes, a, b, c, and d.The first two are used in one key, in the public value n1 = a × b. The other two are used in another key, in the public value n2 = c × d.
What is gcd(n1, n2)?
n1 and n2 must be relatively prime toeach other. (There can't be any number other than 1 that both of them aredivisible by, because if there were such a number, it would have to be oneof the four primes a, b, c, or d... but n1 isn't divisible by c or d, and n2isn't divisible by a or b. If this is hard for you to see,you might try reading more about the uniqueness of prime factorizations, whichthis explanation has assumed without being very explicit about it.)
So, gcd(n1, n2) = 1 and this hasn'tgiven us any new information about the values of a, b, c, and d. And that's a good thing for the security of theseRSA keys, because it provides no shortcut to factorizing them!
OK, what if we somehow re-used a prime between two different RSAkeys?
In this scenario, there are now only three different primes a, b, and c. Somehow, b has been re-usedin two different keys, so the public values are n1 = a × b and n2 = b × c. In thiscase, the re-use of a prime number across keys turns out to be extremelysignificant, and extremely bad for the security of those keys.
The security problem comes in if someone comes across both publickeys and, looking at the public values n1 andn2, decides out of curiosity to calculategcd(n1, n2). This time, the resultis not 1, but rather b, because both n1and n2 are evenly divisible by b!
Noticing this leads quickly to cracking both keys, because now it'seasy to calculate a = n1 / b andc = n2 / b. That reveals both of thesecret prime factors of both keys, which is enough to derive a completeprivate key for each and start decrypting encrypted messages. Whoops!
Once again, the 'normal' case gives gcd(ab, cd) = 1 and revealsnothing extra, but the 'shared prime' case gives gcd(ab, bc) = b,which leads to discovering both factors, revealing the private keysfrom the public keys. This means that using a prime in one's RSAkey that someone else has already used in their RSA key is avery bad security failing.
Common factors in practice
But we normally choose these prime numbers 'at random', so what arethe odds that this would happen by chance? It's astronomically unlikelywith modern key sizes.
How unlikely is it that a prime number would be used in two different keys?
The two primes that go into a 1024-bit RSA key are generally both 512 bitslong. (If you multiply a j-digit number by a k-digit number,you can expect the answer to be around j+k digits long.Likewise with a j-bit and a k-bit number. This is based onthe idea that bj × bk= b(j+k).)
How many different 512-bit primes are there? A theorem calledthe PrimeNumber Theorem can be used to make a good estimate. It indicatesthat the fraction of numbers around the size of 2512 that areprime is around 1/(512 ln 2)=0.0028... or around 0.28%. Wecan also test this experimentally with a random sample, which showsaround the same result. Note that this includesall 512-bit even numbers, which are never prime, so about 0.6%of odd 512-bit numbers are prime.
One way to get an experimental estimate of the fraction of 512-bitnumbers that are prime is
A more condensed version:
Blackjack Rsa Meaning Examples
python -c 'import gmpy; print len([1 for i in xrange(1000000) if gmpy.is_prime(gmpy.rand('next', 2**512))])'
Anyway, this suggests that there are somewhere between 2503 and2504 512-bit primes (though the number will also depend on what we meanby a 512-bit prime, like whether it stops being one if it has too many leading zeroes).That is a vast number, and it's incredibly implausible to envision human beings everchoosing the same one of them twice by accident. (You can check thisby doing the birthday paradox calculation, even assuming thatwe generate quadrillions of public keys instead of millions or billions.)
What happened when researchers looked for re-used primes?
As a 'sanity check', Arjen Lenstra et al.tried a gcd-calculating trick out on several million real keys (mostly thosegathered by the EFF SSL Observatory) andcracked about 13000 of them. This led to aNew York Times report emphasizing thatthis could be a serious flaw in the way RSA is used: about 0.2% of all keysseen on the Internet seem to be vulnerable.
As the Times reported, Lenstra's group concluded that theproblem is that some users of RSA have faulty random number generators:
The system requires that a user first create and publish the product of two large prime numbers, in addition to another number, to generate a public “key.” The original numbers are kept secret. To encrypt a message, a second person employs a formula that contains the public number. In practice, only someone with knowledge of the original prime numbers can decode that message.
For the system to provide security, however, it is essential that the secret prime numbers be generated randomly. The researchers discovered that in a small but significant number of cases, the random number generation system failed to work correctly.
Blackjack Rsa Meaning Slang
So we need to be able to choose prime numbers randomly. That, in turn,assumes that whatever software originally generated the RSA keys has theability to do this. It's easy to find cases where things that ought tobe random are relatively predictable;I remember gambling and adventure games on the old Apple ][ computercould be extremely predictable. Just after turning on thecomputer and starting a game, the first hand of Blackjack or the firststorm at sea always came out exactly the same. In fact, we have justseen another more modern example of this: the random numbers generated bygmpy in the 'how many 512-bit primes?' Python program above are the sameevery time you run the program! If we used that program to generate RSAkeys, the same keys would be generated every time too.
If random number generators are failing to produce truly unpredictablenumbers, this can produce serious weaknesses in cryptography, because anattacker may have various ways to guess 'secret' key values, or at leastnarrow down the possibilities dramatically. Most computer systems todaygenerate random numbers not primarily by measuring a physical quantitylike radio staticor lava lamppatterns but rather by using some sort of formula that gets fed with some(ideally) unpredictable value called a 'seed'. To get truly unpredictablenumbers, we need truly unpredictable seeds from a large enough pool ofpossibilities. (The phenomenon where gmpy generates the same random numbersevery time is an extreme case, where we haven't even attempted to givethe random number generator a seed and it hasn't tried to create onefrom its environment.)
Security problems with inadequately or inappropriately sseded random numbergenerators have arisen before; in1996, Ian Goldberg and David Wagner demonstrated a practical way ofattacking the SSL implementation in Netscape Navigator because ofpredictable random-number generators. In 2008, the Debian Projectrevealed that one of its developers had mistakenly removed code fromOpenSSL in 2006 that catastrophicallyweakened the random number generator (causing RSA keys generated on Debian systems during thatperiod to be limited to a pool of just 32,768 possibilities perkey size! ... all of which an attacker could generate at home).
The idea that poor random number generators would make a collectionof RSA keys jointly vulnerable to gcd, even though no individual keyappears vulnerable in isolation,had beenpublished as early as 1999 as a critique of RSA, but perhaps notexperimentally demonstrated.
As Lenstra's group published its results,another group ofresearchers led by Nadia Heninger was simultaneously exploring theRSA public keys used on the Internet, and came up with similar results— likewise using a greatest-common-divisor method to find commonfactors. Heninger's group found a more specific explanation for how theweak keys came to be; they were able to track down specific devicesthat have been habitually generating them! The devices in question'include[d] firewalls, routers, VPN devices, remote server administration devices, printers, projectors, and VOIP phones' from 'more than thirty differentmanufacturers'. (Many of these devices have web interfaces, andsecurity-conscious users would far prefer to log in and configure themover HTTPS than insecure HTTP — hence the devices need to havetheir own public keys to use with the HTTPS connections.) Themanufacturers in question were advised about the problem.
These devices don't have keyboards and mice that they can use to helpseed their random number generators (as PCs often do, looking at theprecise, unpredictable timing of user input), and they might be programmedto generate RSA keys automatically the first time they're turned on, perhapswithout seeding the random number generator properly, or without havingmuch with which to seed it. (Random number generators can be securelyseeded with other kinds of hardware, too, but many device makers haven'trealized this or haven't made provisions for taking advantage of therandomness that occurs in certain kinds of circuits.)Without proper seeding, the number ofdifferent primes they can conceivably generate is greatly reduced, andthe chance that two devices will independently generate the same primegoes way up — an effect that eventually becomes visible when alarge number of public keys are collected and compared.
The paper from Heninger's groupis now available; it's called 'Mining Your Ps and Qs: Detection ofWidespread Weak Keys in Network Devices'.
Calculating the greatest common divisor
I mentioned above that calculating gcd is very fast. One useful way tocalculate gcd — even for huge numbers — is withEuclid'salgorithm, which Donald Knuth calls 'the oldest nontrivial algorithmthat has survived to the present day'.
Euclid considered the problem of finding the gcd of two integers inElements, book VII, proposition 2, and gave a very practicalway to do it:
Δύο ἀριθμῶν δοθέντων μὴ πρώτων πρὸς ἀλλήλους τὸ μέγιστον αὐτῶν κοινὸν μέτρον εὑρεῖν. | To find the greatest common measure of two given numbers (which are) not prime to one another. |
Ἔστωσαν οἱ δοθέντες δύο ἀριθμοὶ μὴ πρῶτοι πρὸςἀλλήλους οἱ ΑΒ, ΓΔ. δεῖ δὴ τῶν ΑΒ, ΓΔ τὸ μέγιστον κοινὸνμέτρον εὑρεῖν. | Let AB and CD be the two given numbers (whichare) not prime to one another. So it is required to findthe greatest common measure of AB and CD. |
Εἰ μὲν οὖν ὁ ΓΔ τὸν ΑΒ μετρεῖ, μετρεῖ δὲ καὶ ἑαυτόν, ὁΓΔ ἄρα τῶν ΓΔ, ΑΒ κοινὸν μέτρον ἐστίν. καὶ φανερόν, ὅτικαὶ μέγιστον· οὐδεὶς γὰρ μείζων τοῦ ΓΔ τὸν ΓΔ μετρήσει. | In fact, if CD measures AB, CD is thus a commonmeasure of CD and AB, (since CD) also measures itself.And (it is) manifest that (it is) also the greatest (common measure). For nothing greater than CD can measure CD. |
Εἰ δὲ οὐ μετρεῖ ὁ ΓΔ τὸν ΑΒ, τῶν ΑΒ, ΓΔ ἀνθυφαιρουμένουἀεὶ τοῦ ἐλάσσονος ἀπὸ τοῦ μείζονος λειφθήσεταίτις ἀριθμός, ὃς μετρήσει τὸν πρὸ ἑαυτοῦ. μονὰς μὲνγὰρ οὐ λειφθήσεται· εἰ δὲ μή, ἔσονται οἱ ΑΒ, ΓΔ πρῶτοιπρὸς ἀλλήλους· ὅπερ οὐχ ὑπόκειται. λειφθήσεταί τις ἄραἀριθμὸς, ὃς μετρήσει τὸν πρὸ ἑαυτοῦ. [...] | But if CD does not measure AB then some numberwill remain from AB and CD, the lesser being continually subtracted, in turn, from the greater, which willmeasure the (number) preceding it. For a unit will not beleft. But if not, AB and CD will be prime to one another[Prop. 7.1]. The very opposite thing was assumed. Thus,some number will remain which will measure the (number) preceding it. [...] |
(text, figure, and translation from Richard Fitzpatrick's Euclid)
Euclid's core observation is that if a ≥ b and b > 1,gcd(a, b) = gcd(a-b, b). (Wikipedia callsthis 'the principle that the greatest common divisor of two numbers does notchange if the smaller number is subtracted from the larger number'.) Can youprove this, or follow Euclid's original proof in Fitzpatrick's edition (at p. 196)?
So a simple way of stating the subtraction-based form of Euclid's algorithm is: to find the greatest common divisor of two numbers, replace the larger number with the smaller number subtracted from the larger. Repeat this until one of the numbers reaches 1 (in which case the gcd is 1, and the numbers are relatively prime) or until one of the numbers reaches 0 (in which case the gcd is the remaining value of the other number).
This is pretty fast, but there is an even faster way: instead of repeated subtraction, we can use the modulo operator to see what the result of the repeated subtractions will be. That is, if a ≥ b, then gcd(a, b) = gcd(a mod b, b).
So the modulo-based form is: to find the greatest common divisor of two numbers, replace the larger number with the larger number mod the smaller. Repeat this until one of the numbers reaches 1 (in which case the gcd is 1, and the numbers are relatively prime) or until one of the numbers reaches 0 (in which case the gcd is the remaining value of the other number).
Pairwise gcd of many numbers at once?
I note in passing that even though Euclid's gcd is incredibly fastcompared to trying to factor numbers, it would still take quitea long time to apply to to every pair of RSA public keys on thewhole Internet—since there are millions of them and thenumber ofpossible pairs of things grows with the square of the number ofthings. There are still further tricks to make this processeven faster in this case; Lenstra's team thought it best not toelaborate, saying'sapienti sat',while Heninger's team creditstechniquespublished in 2004 by Daniel J. Bernstein. For purposes ofthe present puzzle, the Euclidean gcd technique is totallysufficient because the number of public keys is reasonably small(just one hundred).
This challenge
Now, you can download the challenge file,which contains 100 RSA public keys and 100 corresponding messages,each message encrypted with one of the public keys. The keys are1024-bit, so we would normally not expect to be able to crack any ofthem. [Note added 2016: here 'we' refers to an ordinary computer user.Expert opinion holds that some teams and organizations can do it with theirresources and that keys of this size should no longer be used for securitypurposes.]
However, some fraction of these keys are weak in the same way as the weakkeys analyzed by Lenstra's and Heninger's groups: they share a prime withanother key in our sample! (Not all of the keys are weak, and I won'ttell you ahead of time exactly how many are weak. But the weakness isalways a result of sharing factors with other keys within this set of 100.)Your task, then, is to write a program to figure outwhich keys are weak and crack them using gcd, thereby allowing you todecrypt the corresponding messages.
In order to do this, you need to be able to get the n valuesfrom the public keys, which are stored as PEM files (a common format forrepresenting a public or private key). The challenge contains a READMEfile that gives an OpenSSL command line to do this.
schoen@sescenties:~/challenge$ openssl rsa -in 1.pem -pubin -text -noout
Public-Key: (1024 bit)
Modulus:
00:e1:bf:0c:77:4b:35:82:07:7f:64:fe:ac:b3:76:
14:30:59:2b:51:aa:dc:e3:8e:43:d7:3b:eb:6e:f5:
4b:20:4d:9e:e5:d8:c7:3b:c7:26:72:99:79:37:75:
d0:85:14:58:f6:0e:9e:28:95:ee:fe:5d:dc:bb:54:
14:c5:3e:10:87:cd:ce:04:55:77:00:cf:d2:bb:fc:
78:c5:00:1f:c9:ff:b5:5e:ec:58:f8:e6:ba:69:c9:
dc:b4:82:62:e6:ce:b2:07:bc:a2:4c:4c:75:c7:b2:
dc:b4:15:43:17:ff:41:1d:5a:08:20:ab:05:23:9e:
40:05:29:a7:20:30:1f:60:59
Exponent: 65537 (0x10001)
Notice that the modulus (the value of n) is in hexadecimal, soyou may also need to convert it back to base 10 — and remove thecolons — in order to do arithmetic on it with some tools and programminglanguages. You could remove the extraneous stuff from the Unix command line withsomething like
$ openssl rsa -in 1.pem -pubin -text -noout grep '^ ' tr -dc '[0-9a-f]'; echo
[Note added 2016: I did not notice the simpler possibility of openssl rsa -in 1.pem -pubin -modulus -noout
, which avoids some of the subsequent manipulations.]
On the other hand, here is one way to do the key import using Python (assumes you have PyCrypto, Debian package name python-crypto).
>>> from Crypto.PublicKey import RSA
>>> pem1 = open('1.pem').read()
>>> k1 = RSA.importKey(pem1)
>>> print k1.n
158524431603998301627063051794718875703486828493173522044718048211823310577669762712825798122414867403464750160902730286113975680954506122323962740369060552422618943616074212679123792772834910564597740238693405808101113257556922398679681160192066227150985912522556641505035902589310014574430872209669989818457
And here's an example using Ruby.
irb(main):001:0> require 'openssl'
=> true
irb(main):002:0> key = OpenSSL::PKey::RSA.new File.read '1.pem'
=> -----BEGIN RSA PUBLIC KEY-----
MIGJAoGBAOG/DHdLNYIHf2T+rLN2FDBZK1Gq3OOOQ9c76271SyBNnuXYxzvHJnKZ
eTd10IUUWPYOniiV7v5d3LtUFMU+EIfNzgRVdwDP0rv8eMUAH8n/tV7sWPjmumnJ
3LSCYubOsge8okxMdcey3LQVQxf/QR1aCCCrBSOeQAUppyAwH2BZAgMBAAE=
-----END RSA PUBLIC KEY-----
irb(main):003:0> key.n
=> 158524431603998301627063051794718875703486828493173522044718048211823310577669762712825798122414867403464750160902730286113975680954506122323962740369060552422618943616074212679123792772834910564597740238693405808101113257556922398679681160192066227150985912522556641505035902589310014574430872209669989818457
If you can factor this n, you can break the public key stored in1.pem and then read the encrypted message in 1.bin. (But I'm not tellingwhether key #1 is actually one of the weak keys or not...) This is thebase-10 equivalent of the hexadecimal value given in the previous example.
Blackjack Rsa Meaning Synonyms
What do you do once you have the p and q values for thekeys you've proven are vulnerable? Well, it would be most practical toconstruct a new PEM file from them containing a complete usable privatekey, which involves a few details beyond the scope of this challenge.So, I've put up a C program to create a complete private keygiven p and qwhich you can compile and use. (If you find it inconvenient to compilethis C code, there is anonline versionavailable on the web where you can specify p and q inside the URL.)
Then, use this private-key PEM file to decrypt the associated encrypted.bin file and read its contents. Repeat the process for all of the keysthat you can crack.
Extracting an answer
In the style ofthe Mystery Hunt and othercontemporary puzzle hunts, the challengeeventually yields a specific answer that is a single word — but you'llhave to figure out how to interpret the decrypted data to yield this word,since the RSA-decrypted data is itself in a non-RSA-related code. I'mnot providing any specific instructions about what to do with thedecrypted data beyond the fact that it can be interpreted as a referenceto a single English word. (The answer word is a common noun, not aproper noun; if your guess at the answer is a proper noun, you haven'tsolved the puzzle all the way to the last step yet!)
Feel free to let me know if youfind the word!
Acknowledgements
Thanks to Daniel Kahn Gillmor for helpful comments on this text, to Micah Lee for thelayout, to Vera Yin for testing the puzzle, and to Asheesh Laroia for setting up and running the old and new versions of the private key web application.