NCATComp410 / comp410_fall_2024

COMP410fFall 2024 semester class project
MIT License
0 stars 0 forks source link

Detect IBAN_CODE #16

Closed Jason-Nobles closed 1 week ago

Jason-Nobles commented 2 months ago

Description:

The IBAN_CODE is an important PII in regards to international banking. It stands for "International Bank Account Number" and is a code/system mostly adopted by European countries. This account number is used to identify an individuals bank account and financial institution within a particular country for the use of securely & quickly making/receiving international payments.

In comparison to better understand, the United States uses a similar system called SWIFT (Society for Worldwide Interbank Financial Telecommunication). Similar to the IBAN_CODE, this code represents a bank code used for identifying financial institutions and bank accounts worldwide and can be found on your bank statement.

Detection Steps:

The IBAN_CODE can be detected by verifying its format, which is displayed/detailed as the following (sample): Country Code | Check Digits | Bank Identifier | Basic Bank Account Number (BBAN) GB 10 XYZW 765432 12345678

Jmnobles1 commented 2 months ago

What determines the numbers for the check digits and the BBAN for the format or is it random ?

claesmk commented 2 months ago

Looks OK but I agree with previous comment about adding more details to the check digits.

Jason-Nobles commented 2 months ago

The “Check Digit” which is position 3 & 4 of the IBAN code, is the first and most important factor when verifying the accuracy of the IBAN code. The check digit is a calculated number using a formula (MOD97 algorithm) that takes into account the other characters in the IBAN code, it helps to ensure the other characters are valid (BBAN, BI, and Country code) before doing any further analysis, this is called the checksum of the IBAN.

Also, the IBAN can vary in length based on different countries in terms of the Bank indentifier and account number, it can be up to 34 characters.

Calculation steps of check digit (example):

  1. IBAN without check digit (replace position 3 & 4 with zeros) -> DE00100100100987654321
  2. Place the country code and check digit (0’s) at the end of the IBAN code -> 100100100987654321DE00
  3. Replace the country code with corresponding numbers based on letter (A=10, B=11, C=12, etc.) -> 100100100987654321131400
  4. Divide by 97 to find the remainder (Mod) -> 100100100987654321131400 Mod 97 = 69
  5. Subtract from 98 -> 98-69 = 29

Therefore the check digit is 29: DE29100100100987654321