IBAN checksum generation


A checksum or hash sum is a small-size datum calculated from an arbitrary block of digital info designed for detecting blunders that may have been created throughout its transmitting or storage. The very process which yields the checksum, presented a data input is known as a checksum feature or checksum algorithm.

Based on its design targets, a very good checksum algorithm will most likely output a substantially distinct value, perhaps for little changes made to the input. This is especially valid of cryptographic hash features, which may be utilized to identify numerous data corruption flaws and validate overall data integrity; if the calculated checksum for the current data input matches the saved value of a previously computed checksum, there is certainly a high probability the data has not been unintentionally changed or corrupted.



Precisely what does an incorrect checksum signify?

If the IBAN calculator informs you that the bank account number you typed in contains an unsuitable checksum, there are lots of possibilities:

- Maybe you have a typo in the bank code or bank account number you typed in. Make sure you check them both. If you have a typo in one of these numbers, obviously the resulting IBAN will be inaccurate also.

- Is this perhaps a unique bank account, for instance one for accumulating donations for a big organisation, or the bank account of an exceedingly special and powerful individual (founder of the bank, vital politician and so on .) ? At times "pretty" bank account numbers such as e. g. Bank account no. 1 is utilized due to its elegance even if they don't match the checksum scheme. Thus, it is possible that the bank account number is appropriate although it contains a defective checksum.

- Maybe the bank account was opened up at a banking institution that later got acquired by another bank. At times this has the effect that’s why the bank account number remains the same, the checksum method transforms.



- Maybe you found a blunder in our checksum checking software. This is likely if you are sure you typed in an appropriate bank account that is assigned to a normal individual, to ensure the second possibility does not apply.

- Even though it incurs a defective checksum, the IBAN calculator will calculate an IBAN, specifically due to the second possibility above. However you should then check whether you really typed in the appropriate bank account number to prevent ending up with an incorrect IBAN. Checking an account number and calculating an IBAN for it are two independent steps.

Generation of an IBAN in the UK


The IBAN is derived from the BBAN. The example below is a HSBC Bank account:

40-05-15 12345674

The separators are removed, and the first four characters from the HSBC BIC code are placed at the front, making up the BBAN.


MIDL 4005 1512 3456 74

Next the country, in this case GB, and the digits 00 are placed on the right hand end. The example would now look like this:

MIDL40051512345674GB00

In order to calculate the check digits, the alphabetic characters are temporarily replaced by numeric digits according to the following table:

 

Converting characters into numbers
A B C D E F G H I J K L M
10 11 12 13 14 15 16 17 18 19 20 21 22

N O P Q R S T U V W X Y Z
23 24 25 26 27 28 29 30 31 32 33 34 35

The example would now look like this:

2218132140051512345674161100



the number is then divided by 97 to obtain the remainder. The remainder is subtracted from
98, and the resulting two numeric digits are the check digit pair for the IBAN. If the result of
subtracting the remainder from 98 is less than 10, then a leading zero is used (i.e. 01, 02,
etc).

The IBAN is then constructed from the version noted just before converting alphabetic
characters to numbers. For the example, this was:

MIDL40051512345674GB00

The two ‘00’ numeric digits at the right-hand end are replaced by the check digits which
have been calculated. In the example, the remainder after division by 97 was 76, giving the
check digit pair 26. The country code and check digits are then moved to the front of the
IBAN. The electronic example would now look like this:

GB26MIDL40051512345674

Finally it is spaced out in sets of four alphabetic characters/numeric digits, and IBAN is
added at the front to identify it in this printed presentation:

IBAN GB26 MIDL 4005 1512 3456 74