FR76 in French IBANs

French IBANs are often prefixed with FR76

some examples:

FR76 30056000480048161128019
FR76 30006000011234567890189
FR76 10096183230002533370166
FR76 10907005223602151301111

The value 76 represents Check Digits (CD) that are used to validate the rest of the IBAN. Intuitively, one would expect CD to change along with the value of the thing they are checking. To understand this behaviour we will take a closer look at the process of generating IBAN CDs (ICD).

IBAN structure - France

The authoritative description of the structure is available from SWIFT [1]. For our purposes it is sufficient to note the following parts of an IBAN:

FR followed by two digits The digits are the ICD
10 numeric The bank identifier. BANK_ID
11 alphanumeric The account identifier. ACCOUNT_ID
2 numeric The French national CDs. NCD

Example

   ICD  BANK_ID     ACCOUNT_ID   NCD  
FR 76   1090700522  36021513011  11

Rules and notation

All whitespace is ignored during processing, it is used in examples for readability only.

It is possible that generated ICD or NCD are a single digit, in this case the value is always left-padded with 0

The symbol indicates string concatenation, for example:

1200 = 1200

For any integer x we define m(x) = x mod 97.

ICD (IBAN CD) generation

Letters are replaced by digits. This is done by taking A ➔ 10, B ➔ 11, etc… In particular F ➔ 15 and R➔ 27. For example FR00 ➔ 152700.

The value 152700 is actually a constant in ICD generation that is defined as:

ICD = 98 - m(BANK_ID ⊕ ACCOUNT_ID ⊕ NCD ⊕ 152700)

In our example we have

ICD(   1090700522 36021513011 11) = 
98 - m(1090700522 36021513011 11 152700) =
98 - 22 = 
76

NCD (National CD) generation

While ICD generation is common to all countries, the NCD generation is specific to France. Other countries use different approaches for generating NCD or even don’t generate them at all as is the case with Germany.

NCD = 97 - m(BANK_ID ⊕ ACCOUNT_ID ⊕ 00)

Combining ICD and NCD

Because BANK_ID ⊕ ACCOUNT_ID appear in both ICD and NCD, it is convenient to substitute X = BANK_ID ⊕ ACCOUNT_ID . Substituting X and expanding NCD, we can now expand ICD:

ICD = 
  98 - m(BANK_ID ⊕ ACCOUNT_ID ⊕ (97 - m(BANK_ID ⊕ ACCOUNT_ID ⊕ 00)) ⊕ 152700) =  
  98 - m(X                    ⊕ (97 - m(X ⊕ 00))                    ⊕ 152700)

we then have:

m(X    ⊕ (97 - m(X ⊕ 00)) = 
m(100X + (97 - m(100X)) =
m(100X + m(-100X)) = 
m(97) = 
0

and finally:

ICD = 
  98 - m(0 ⊕ 152700) = 
  98 - m(152700) = 
  98 - 22 = 
  76

Conclusions

From what we have seen so far, it may look like ICD should always be 76. To understand why this is sometimes not so, we need to revisit the way NCD is generated. Just like with ICD, during NCD generation, letters are converted to digits, but the way it is done is different from ICD:

   A  J    ➔  1 
   B  K  S ➔  2 
   C  L  T ➔  3 
   D  M  U ➔  4 
   E  N  V ➔  5 
   F  O  W ➔  6 
   G  P  X ➔  7 
   H  Q  Y ➔  8 
   I  R  Z ➔  9

This means that if ACCOUNT_ID contains letters, when NCD is generated, the value of ACCOUNT_ID it is processing differs from the value of ACCOUNT_ID that CID generation is processing.

Instead of

ICD = 98 - m(X ⊕ (97 - m(X ⊕ 00)) ⊕ 152700)

we have

ICD = 98 - m(X ⊕ (97 - m(Y ⊕ 00)) ⊕ 152700)

and terms dont cancell out nicley as before.

The bottom line is that whenever a French account number is comprised only of digits, the resulting ICD is 76.


iban  fr76