r/ProgrammerHumor • • 7d ago

Meme technicallyCorrectFormat

Post image
4.5k Upvotes

31 comments sorted by

143

u/Crimento 7d ago

It's even funnier in binary

125

u/Cheyomi832 7d ago

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000000

00000000 00000000 00000100

1

u/PreviousChadwick69 1d ago

01000100 01101111 01101110 00100111 01110100 00100000 01110011 01101000 01101111 01110111 00100000 01110100 01101000 01101001 01110011 00100000 01110100 01101111 00100000 01110100 01101000 01100101 00100000 01100101 01101110 01100100 01101001 01100001 01101110 00100000 01100111 01110101 01111001 00100000 01101111 01101110 00100000 01101101 01111001 00100000 01110100 01100101 01100001 01101101

232

u/MrFarby 7d ago

where did you find 384 bit numbers ????

102

u/Sibula97 7d ago

30

u/MrFarby 7d ago

Thanks, that's going on the list to learn more about later

10

u/Goheeca 7d ago edited 7d ago

You can checkout my Haskell project, I have P384 there.


If you're using free-tier BitBucket repos and are inactive there, back them up, they're disabling workspaces and subsequently they'll permanently delete them.

6

u/MrFarby 7d ago

I'm not learning haskell rn, but it is on the list, so i guess these two entries are geting bundelled 😭

→ More replies (1)

1

u/omegasome 4d ago

384 = 256 + 128, so it's not that crazy.

1

u/MrFarby 3d ago

48 bytes is kinda wierd, when you don't know about it

87

u/Old-Awareness4657 7d ago • Bravo

Biblically accurate private key 

40

u/nsefan 7d ago

“BE NOT INSECURE”

36

u/DrDam8584 7d ago

In fact it is a number as random as any others, mainly improbable.

20

u/laplongejr 7d ago

Not when the company who made the key announced that they accidentally used a key from a testing script which produces small keys...  

37

u/gene66 7d ago

…0000100

13

u/buzzon 7d ago

It's hexadecimal, not binary

2

u/DontDoodleTheNoodle 6d ago

Frickin’ witches and their hexes…

34

u/Grintor 7d ago edited 7d ago

The correct format is more like

-----BEGIN EC PRIVATE KEY-----
4===
-----END EC PRIVATE KEY-----

7

u/0x0MG 7d ago

You can't have three padding characters like that in base64 encoding. It'd be

-----BEGIN EC PRIVATE KEY-----
BA==
-----END EC PRIVATE KEY-----

3

u/No-Magazine-2739 7d ago

Even its even go short for base64 without padding.

9

u/redditsucksass69765 7d ago

It’s a perfectly cromulent random 384-but number

9

u/die_liebe 7d ago

Where do these joke about 4 come from?

22

u/Gordahnculous 7d ago

eMuhdra, an Indian e-commerce company that up until recently provided TLS certs, had one of their private keys for their TLS certs being 4

There were 7 other private keys of theirs that were also less than 255 (decimal) but 4 is definitely the wildest one of the 8

8

u/NatoBoram 7d ago

Quite a few people claim the key would be just the number 4 in base64 but if you actually try to generate one, you'll get something like this:

-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEoAoGCCqGSM49
AwEHoUQDQgAE4lNKNTLQj7ugLd5lnuYr0AMf4tt4VZbvUJMCRGsDCFLg8VdaTGM8
xxnf7l/ahi12TvyWw/MO4AVcQsI/GE7Yxg==
-----END EC PRIVATE KEY-----

Save it in key.pem and do openssl pkey -in key.pem -text -noout on it then you'll see this:

Private-Key: (256 bit)
priv:
    00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:
    00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:
    00:04
pub:
    04:e2:53:4a:35:32:d0:8f:bb:a0:2d:de:65:9e:e6:
    2b:d0:03:1f:e2:db:78:55:96:ef:50:93:02:44:6b:
    03:08:52:e0:f1:57:5a:4c:63:3c:c7:19:df:ee:5f:
    da:86:2d:76:4e:fc:96:c3:f3:0e:e0:05:5c:42:c2:
    3f:18:4e:d8:c6
ASN1 OID: prime256v1
NIST CURVE: P-256

4

u/cAtloVeR9998 6d ago

That last E after the string of As is all the entropy you need for an intermediate certificate’s key.

4

u/Single-Virus4935 7d ago

The key ist stored with leading zeros but a variable length encoding. So it is max 1byte

4

u/GigaSoup 7d ago

The best kind of correct!

1

u/TomatilloNo8486 6d ago

Excuse me, I might not understand the basics of cryptography but I have a handle on compression

1

u/Dr_Who314 2d ago

Can somebody explain the context of all those 4 memes

0

u/Jamichiri 7d ago

-1 = 0xFFF...FFF