Luhn formula and mode n cryptanalysis by juvielyn h. arbon , maed -math
PROPONENT HANS PETER LUHN Born in Barmen, Germany (Now part of W uppertal) A computer scientist for IBM The creator of LUHN algorithm
Luhn formula The L uhn algorithm or Luhn formula, also known as the "modulus 10" or "mod 10" algorithm, is a simple checksum formula used to validate a variety of identification numbers, such as credit card numbers, IMEI numbers, national provider identifier numbers in US and canadian social insurance numbers. It was described in U.S. Patent no. 2,950,048, filed on January 6, 1954, and granted on august 23, 1960. Hans Peter Luhn was awarded over 80 patents. It is not intended to be a cryptographically secure hash function; it was designed to protect against accidental errors, not malicious attacks. Most credit cards and many government identification numbers use the algorithm as a simple method of distinguishing valid numbers from mistyped or otherwise incorrect numbers.
Steps involved in Luhn algorithm Let’s understand the algorithm with an example: C onsider the example of an account number “ 79927398713 “. Step 1 – Starting from the rightmost digit double the value of every second digit,
Step 2 – If doubling of a number results in a two digits number i.e greater than 9(e.g., 6 × 2 = 12), then add the digits of the product (e.g., 12: 1 + 2 = 3, 15: 1 + 5 = 6), to get a single digit number.
Step 3 – Now take the sum of all the digits.
Step 4 – If the total modulo 10 is equal to 0 (if the total ends in zero) then the number is valid according to the Luhn formula; else it is not valid. Since the sum is 70 which is a multiple of 10, therefore the account number is possibly valid.
AnOTHER EXAMPLE Assume our credit card number is 4417 1234 5678 9113. Determine if this is a valid card number. SoIution : Note: If the final sum is divisible by 10, then the credit card number is valid. If it is not divisible by 10, the number is invalid. If we add all the digits in the third row (sum doubled digit), the result is 70 and it is divisible by 10. Therefore, the card number is valid. Starting digit 4 4 1 7 1 2 3 4 5 6 7 8 9 1 1 3 Digit x 2 8 4 2 7 2 2 6 4 10 6 14 8 18 1 2 3 Sum Doubled digit 8 4 2 7 2 2 6 4 1 6 5 8 9 1 2 3
remember The idea is simple, we traverse from end. For every second digit, we double it before adding. We add two digits of the number obtained after doubling.
What IS CRYPTOGRAPHY? It is associated with the process of converting ordinary plain text into unintelligible text and vice-versa. It is a method of storing and transmitting data in a particular form so that only those for whom it is intended can read and process it.
Mode n cryPtanaLysIs It is an attack applicable to block and stream ciphers. It is a form of partitioning cryptanalysis that exploits unevenness in how the cipher operates over equivalence classes ( congruence classes ) modulo n. The method was first suggested in 1999 by John Kelsey, Bruce Schneier , and David Wagner and applied to RC5P (a variant of RC5) and M6 (a family of block ciphers used in the Firewire standard). These attacks used the properties of binary addition and bit rotation modulo, a Fermat prime.