If you have more than a few bank cards, door-entry keycodes, or other small numeric passwords to remember, it eventually gets to be a hassle. The worst, for me, is a bank card for a business account that I use once in a blue moon. I probably used it eight times in five years, and then they gave me a new card with a new PIN. İç çekmek.

Quick, What’s My PIN?
How would a normal person cope with a proliferation of PINs? They’d write down the numbers on a piece of paper and keep it in their wallet. we all know how that ends, right? A lost wallet and multiple empty bank accounts. how would a hacker handle it? write each number down on the card itself, but encrypted, naturally, with the only unbreakable encryption scheme there is out there: the one-time pad (OTP).

The OTP is an odd duck among encryption methods. They’re meant to be decrypted in your head, but as long as the secret key remains safe, they’re rock solid. If you’ve ever tried to code up the s-boxes and all that adding, shifting, and mixing that goes on with a normal encryption method, OTPs are refreshingly simple. The tradeoff is a “long” key, but an OTP is absolutely perfect for encrypting your PINs.

The first part of this article appears to be the friendly “life-hack” pablum that you’ll get elsewhere, but don’t despair, it’s also a back-door introduction to the OTP. The second half dives into the one-time pad with some deep crypto intuition, some friendly math, and hopefully a convincing argument that writing down your encrypted PINs is the right thing to do. Along the way, I list the three things you can do wrong when implementing an OTP. (And none of them will shock you!) but in the end, my PIN encryption solution will break one of the three, and remain nonetheless sound. curious yet? Okumaya devam etmek.

The PIN Solution

So first the solution to the bank card problem: write your PIN encrypted with a secret that only you know. instead of needing to remember a four-digit number for each new card, you’ll just need one four-digit number forever. The key is to choose an encryption scheme that’s easy enough to undo so that you won’t look too strange when asked to type the PIN in at the bank teller’s window. This is the classic use of the OTP — an encryption that you can undo in your head.

First, randomly select a secret four-digit number. Then, subtract that number from your PIN and write the result on your card. To get your PIN, when standing in front of the bank teller, simply look down at the card and add the secret number back. The teller will think that you’ve written your PIN on the card. feel free to feel smug, because you’ve used an unbreakable encryption scheme.

Instead of normal addition and subtraction, with the carrying and borrowing across digits, you will want to use modulo-10 math — adding or subtracting ten from the result any time it gets outside the range 0-9. We’ll talk about why below, but for now, here’s a working example.

Suppose the PIN is 1234 — it has to happen so someone, right? — and my random secret number is 1337, naturally. Let’s encrypt. Subtracting 1 from 1 gives a zero, so I write that down. Subtracting 3 from 2 gives -1, which is where the modulo-10 arithmetic comes in. In this case, -1 turns into 9 by adding ten. 3 – 3 = 0, and 4 – 7 = 7, mod-10. My card now has 0907 written on it.

Now let’s decrypt. looking down at the card, I see a 0 and add 1. 9 + 3 = 12, however, so we’ll need to subtract ten to get 2. (That’s the reason to choose addition for the decryption stage, it’s easy to just drop any leading 1s.) 0 + 3 = 3 and 7 + 7 = 14 -> 4<. I type in 1234, and the money is mine! Once you get the hang of adding your secret number to any other number, digit-wise mod-10, you’ll be surprised how quickly it will work. try it out and see if you get good at it within ten minutes. One-Time Pads A one-time pad is both the simplest symmetric encryption scheme and also completely unbreakable. It has three crucial features, two of which were demonstrated above, and getting any of them wrong can be catastrophic. The most important feature of an OTP is that the password needs to be random, and the same length as the text that it encrypts — hence the four-digit secret for the PIN. In an OTP, everything revolves around the secret, which is also its Achilles’ heel. For a four-digit number, keeping a four-digit secret is no problem. but imagine that you want to send gigabytes of encrypted photos of your vacation to a friend. That’s a lot of key material to keep on-hand and secret. Original by [Matt_Crypto], Public DomainSecond, the method of combining the message with the secret has to be similar to the modulo arithmetic, in that the set of encrypted characters and the set of plaintext characters — the PIN in our example — have to map bire bir. Mod-10 ensures this easily: both are in the range 0-9. maybe you’re familiar with using the XOR operator on binary data, which is the same thing as either additiAçık veya Çıkarma, MOD-2. (0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1 ve 1 + 1 = 2 -> 0. QED.) Ayrıca, harfleri de kullanabilirsiniz ve alfabeyi Caesar şifrelemesi gibi “Z” e kadar sarabilirsiniz. veya sadece alfabeyi sayılara eşleyen ve matematik modu-26 yapan ROT13.

Üçüncüsü ve belki bu, birincisinin bir corollary olduğunu, sırrını tek seferlik bir pedde yeniden kullanmamalısınız. Bunun açık olduğunu düşünürsünüz, çünkü şifreleme yöntemi adına bile, ancak pratikte yapmak zor. Ve aslında, pim şifreleme şemam bu kuralı birden fazla tuşla aynı sırrı kullanarak kırar. Yakında buna gireceğiz.

Mükemmel şifrelemeyi mahvetmek

OTP neden kırılmaz? Çoğu şifreleme şemalarını kırmak, genellikle olasılık ve istatistiklere kadar kaynar. Örneğin, bir metni yukarıdaki Sezar şifresiyle şifreleyseniz, plaintext’teki her harf, şifreleme metninde her meydana geldiğinde başka bir tek harfle eşlenir. Orijinal metnin İngilizce olarak İngilizce olduğunu biliyorsanız, en yaygın kullanılan mektubun “E” olduğu durumlarda, “Q”, şifreleme metnindeki en yaygın mektup ise, “E” anlamına gelir. Yani, düz metin ve şifreleme arasındaki istatistiksel benzerlikler buluyoruz ve bunları ikisi arasında bir köprü yapmak için kullanıyoruz.

Plaintext kadar ve rastgele seçilen bir gizli anahtar kullanarak, şifreleme metni ile istatistiksel ilişkiyi kırar. Kartımda yazılmış belirli bir şifreleme metni göz önüne alındığında, 0000 ila 9999 arasındaki her pim mümkündür ve anahtar rastgele seçilirse, eşit derecede muhtemeldir. CipherText’deki düz metin hakkında hiçbir bilgi yoktur – bu esasen Shannon’un kanıtı (kesinlikle klasik PDF) bir özetle Claude Claude. Ve bu yüzden bir OTP kırılmaz.

Diana One-Time Pad [ABD NSA], kamu domainthis aslında kriptografi alanını anlamanın anahtarıdır: şifreleme işlemi sırasında paintext hakkındaki bilgileri çözme girişimidir, böylece daha kısa bir anahtar kullanılmasına rağmen, hayır, Davacının istatistiksel olarak ilgili izleri kalır. Kısa anahtarlar için bu arzu sadece bir kolaylık meselesi değil: Siz ve Hackaday’ın daha önce bu makaleyi indirmek ve okumak için daha önce 500 kib rastgele veri alışverişinde bulunduğunu hayal edin. Konuklar için yazmanız gereken WiFi şifresinin uzunluğunu hayal edin! Bu, OTP’nin önemsiz ve ilginç olmayan bir anlamıdır – kırılmaz olabilir, ancak sırları çoğu uygulama için çok uzun. Real Crypto, istatistiksel ilişkiyi en az kilitli malzeme ile kıran algoritmalar bulmaktır.

Bununla birlikte, kısa veya rastgele olmayan bir şifre kullanılarak bir OTP uygulamasını mahvedebilirsiniz. Şifreniz olarak 1’i kullanarak ve gerektiği gibi tekrarlayarak hayal edin; Bizim şifreleme metni 2345 okundu ve pin ikinci denemede tahmin edilecektir. Ayrıca rastgele bir şifre kullanmak istiyorsunuz; 0000 toplama çünkü matematiği kolaylaştırır, yukarıdakilerden daha kötü olan tek şeydir. (Kesinlikle konuşursak, 0000, 1111, 9999, 1234, 4321, 1111, 9999, 1234, 4321 veya benzeri ise yeniden yuvarlanır.) Yine de doğum gününü kullanmayın. Çocukluk arkadaşlarının eski telefon numaraları kabul edilebilir olabilir.

Modulo aritmetik rolü biraz daha incedir. Hangi işlev kullanılırsa, plaintext’teki olası karakter kümesi, şifreleme metni ile bire birden birini eşlemek gerekir. Niye ya? Mod-10 eklemek yerine basit bir ekleme kullandığınızı hayal edin. PIN şifremi fikrini elde etmek için, 4 – 7 = -3 -> 7’yi 4 – 7 = -3 -> 7 kullandık ve 7 + 7 = 14 -> ile şifresi çözüldü. 6’dan büyük olmamak üzere, 9, maksimum değer eklenmesi, yalnızca 6’yı verir. SADECE 6. CIPHENTEXT’de daha büyük bir setine sahip olduğumuz için bilgi sızdırdık.

Ve bu, karmaşmanın son yolunu bırakır: “Tek seferlik” pedini yeniden kullanarak. Açık, değil mi? Yanlış.

Lorenz Makinesi, Public Domain
Bir yandan, yeniden kullanım kesin bir sorumluluktur. Bir şifreyi çok benzer bir şifreleme şemasında tekrar kullanmak, İkinci Dünya Savaşı sırasında önemli bir kod olan “Tunny” dedi. 4.000 karakter şifreli bir mesaj gönderildi ancak doğru alınmadı. Gönderen, mesajı aynı sır ile yeniden gönderdi, ancak farklı kısaltmalar vb. Kullanarak metinde küçük değişiklikler yaptı. Bu, müttefiklere tunny’i kıracak kadar verdi ve şifrelenen makineyi tersine çevirdi. oyun bitti.

İşte tunny şifresini çözen matematik ve sizi neredeyse asla bir anahtarı tekrar kullanmaya ikna etmelidir. A ve B mesajlarını gizli anahtarla kodlarsak ve biri her ikisini de kullanırsak, (bir mod c) mod (B modu c) = (bir mod b) mod c mod c = a almak için onları bir araya getirebilirler. Mod B, Nerede, şimdi kullandığımız bitsel ya da sayısal modülo operatörüdür. İkili Modulo’nun kendi gerisi olduğu için, sonuç hem paintekslerle hem de gizli anahtardan bağımsız bir şeydir.

Buradan, Akıllı Tahminler A ve B için karşılaştırıldığında ve bunları bir MOD B sonucuyla karşılaştırarak kodu kırabilir. So if you’re pretty sure that “attack” appears in both texts (crypto types always encrypt “attack at dawn”),Ardından, bir mod B ile eşleşme elde edene kadar farklı pozisyonlarda “saldırı” modunu değiştirmeyi deneyebilirsiniz.

Sürpriz sonu

Ama işte son büküm! Yukarıdaki matematiğe rağmen, tüm banka kartlarımızdaki gizli anahtarı tekrar kullanmaya başlayabiliriz. Niye ya? Çünkü pinlerin kendileri rastgeledir. Savaş sırasında gönderilen doğal dil mesajlarının aksine, bir MOD, hem A hem de B’nin rastgele pimler olması durumunda bir C modu kadar rastgeledir.

Böylece bir hacker pimleri nasıl hatırlıyor: Tek seferlik ped hakkında çok şey öğrenerek, nasıl kırılacağını ve bununla birlikte, korunması gereken mesajın kısa olması durumunda nasıl faydalı olduğunu. ve belirli mesajlar için, hatta kuralları bile kırabilirsiniz.

Leave A Comment

Recommended Posts

HomeBot

ile telefonunuzun Ana Sayfa düğmesine yeni işlevler ekleyin Android harika. Doğada açık kaynak olması sayesinde, gerçekten kendi beğenilerine göre özelleştirilebilir. Bununla birlikte, nadiren buraya, DroidViews’e – Ana Sayfa düğmesine girdiğimiz bir şey hakkında konuşalım. Her Android telefonun ekranın altında 3 gezinme düğmesi […]

unnru