Home

Luhnregel

Luhnregel, also known as the Luhn algorithm, is a simple checksum method used to validate identification numbers that include a check digit. It was devised by Hans Peter Luhn of IBM in 1954. The goal is to detect common input errors, such as a single incorrect digit or adjacent-digit transposition, in long numeric identifiers used in finance and telecommunications.

The algorithm works by processing the digits from right to left. Starting with the second digit from

As an illustration, the number 79927398713 is valid under the Luhn check; applying the steps described above

The Luhnregel is widely used as a check digit in credit and debit card numbers, as well

Limitations include that the method is not cryptographically secure and does not protect against deliberate forgery.

the
right,
every
other
digit
is
doubled.
If
doubling
yields
a
number
greater
than
9,
9
is
subtracted
from
it.
All
digits,
after
this
transformation,
are
summed
together
with
the
check
digit.
A
number
is
valid
under
the
Luhn
rule
if
the
total
is
a
multiple
of
10.
produces
a
total
sum
that
ends
in
0,
fulfilling
the
mod
10
criterion.
as
in
other
identifiers
such
as
IMEI
mobile
device
IDs
and
certain
national
identification
numbers,
including
the
Canadian
Social
Insurance
Number.
It
remains
a
practical,
lightweight
validation
tool
in
many
systems.
It
is
designed
to
detect
accidental
errors
and
a
large
proportion
of
typographical
mistakes,
but
not
all
possible
errors
or
sophisticated
fraud.
Some
systems
use
variations
or
additional
checks
alongside
Luhn.