You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e223b7b
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .docs/banks/README.md
+48-7Lines changed: 48 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,25 @@
1
1
# Banks
2
2
3
3
Which banks the library reads, and what it reads from each. Every bank has a page of its own with the template, the
4
-
setup and what has not been seen yet, in a folder per country: `cz/<bank>/`, and `sk/<bank>/` once a Slovak bank is
5
-
read; another country is another folder. This page only says where each one stands, and changes with every bank's pull
6
-
request.
4
+
setup and what has not been seen yet, in a folder per country: `cz/<bank>/` and `sk/<bank>/`; another country is
5
+
another folder. This page only says where each one stands, and changes with every bank's pull request.
7
6
8
7
A bank is in one of three states:
9
8
10
9
-**Verified**: read from real e-mails, its DKIM key pinned and checked daily. `read()` returns a `Transaction`.
11
10
-**Samples only**: the template follows public code ([radekhulan/myinvoice](https://github.com/radekhulan/myinvoice),
12
-
MIT), not a real e-mail, and no key is pinned. `read()` refuses every e-mail from it as `Unverified`, naming the key
13
-
DNS gave, until a real e-mail confirms the template and that key.
11
+
[tomaj/bank-mails-parser](https://github.com/tomaj/bank-mails-parser), MIT), not a real e-mail, and no key is pinned.
12
+
`read()` returns a `Transaction` once the signature verifies with any key DNSSEC proves the bank's domain published;
13
+
ČSOB SK, whose domain has no DNSSEC, stays `Unverified`. A real e-mail moves it to verified and pins its key.
14
14
-**Not yet**: no parser.
15
15
16
+
The tables list every bank in the central bank's register of payment codes: [ČNB](https://www.cnb.cz/cs/platebni-styk/ucty-kody-bank/)
17
+
and [NBS](https://nbs.sk/en/payments/general-information/directories-and-registers/directory-identification-codes-domestic-payment-system-in-sr/),
18
+
read on 2026-11-24. Left out are those that hold no account a payment arrives on: the central banks, building societies
19
+
(stavební spořitelny), development and export banks (Národní rozvojová banka, Česká exportní banka, SZRB, EXIMBANKA SR),
20
+
ČSOB Hypoteční banka, Štátna pokladnica, Sberbank CZ in liquidation, consumer lenders (COFIDIS, BNP Paribas Personal
21
+
Finance) and payment institutions that are not banks (Banking Circle, Comgate, Trust Pay and the like).
22
+
16
23
## Czechia
17
24
18
25
| Bank | State | Reads | Leaves out | Details |
@@ -28,6 +35,26 @@ A bank is in one of three states:
28
35
| Česká spořitelna | not yet |||[#15](https://github.com/landsman/bank-java/issues/15)|
29
36
| Citfin | not yet |||[#21](https://github.com/landsman/bank-java/issues/21)|
30
37
| Partners Banka | not yet || sends no e-mail at all |[#25](https://github.com/landsman/bank-java/issues/25)|
38
+
| mBank | not yet ||||
39
+
| J&T BANKA | not yet ||||
40
+
| PPF banka | not yet ||||
41
+
| TRINITY BANK | not yet ||||
42
+
| ING Bank | not yet ||||
43
+
| PKO BP | not yet ||||
44
+
| Citibank Europe | not yet ||||
45
+
| Deutsche Bank | not yet ||||
46
+
| COMMERZBANK | not yet ||||
47
+
| BNP Paribas | not yet ||||
48
+
| HSBC Continental Europe | not yet ||||
49
+
| Všeobecná úverová banka, pobočka Praha | not yet ||||
50
+
| Oberbank | not yet ||||
51
+
| Volksbank Raiffeisenbank Nordoberpfalz, pobočka Cheb | not yet ||||
52
+
| Bank of China (CEE) | not yet ||||
53
+
| Bank of Communications | not yet ||||
54
+
| Industrial and Commercial Bank of China | not yet ||||
55
+
| Multitude Bank | not yet ||||
56
+
| Artesa, spořitelní družstvo | not yet ||||
57
+
| Peněžní dům, spořitelní družstvo | not yet ||||
31
58
32
59
## Slovakia
33
60
@@ -37,7 +64,21 @@ A bank is in one of three states:
37
64
| ČSOB | samples only | incoming SEPA credits; IBANs, name, symbols from the payer's reference, message | outgoing payments, transaction id; the 2019 sample was not DKIM-signed and `csob.sk` has no DNSSEC |[csob](sk/csob/README.md)|
38
65
| Slovenská sporiteľňa | not yet |||[#23](https://github.com/landsman/bank-java/issues/23)|
39
66
| Tatra banka | samples only | credits and debits; transaction id and direction from the signed subject, IBAN, name, symbols from the payer's reference, balance | counter-account, type; its 2019 key is published but not pinned |[tatra](sk/tatra/README.md)|
67
+
| Všeobecná úverová banka (VÚB) | not yet ||||
68
+
| Prima banka | not yet ||||
69
+
| UniCredit Bank, pobočka | not yet ||||
70
+
| mBank, pobočka | not yet ||||
71
+
| J&T BANKA, pobočka | not yet ||||
72
+
| Komerční banka, pobočka | not yet ||||
73
+
| Penta Bank | not yet ||||
74
+
| ING Bank, pobočka | not yet ||||
75
+
| Citibank Europe, pobočka | not yet ||||
76
+
| Commerzbank, pobočka | not yet ||||
77
+
| Oberbank, pobočka | not yet ||||
78
+
| BKS Bank, pobočka | not yet ||||
79
+
| PKO BP, pobočka | not yet ||||
80
+
| KDB Bank Europe, pobočka | not yet ||||
40
81
41
82
What a missing transaction id means for deduplication, and a masked account for knowing whose payment it is:
42
-
[using the library](../usage.md#two-checks-stay-with-you). A bank that is not yet read has an issue collecting what is
43
-
known and which samples are needed; an e-mail from it is `Unparsed` with `reason()``NOT_A_BANK_EMAIL`.
83
+
[using the library](../usage.md#two-checks-stay-with-you). A bank that is not yet read gets an issue collecting what is
84
+
known and which samples are needed once someone asks for it; an e-mail from it is `Unparsed` with `reason()``NOT_A_BANK_EMAIL`.
(2015), both MIT. That e-mail was signed with selector `mta`, and `mta._domainkey.tatrabanka.sk` is still published:
7
7
RSA 2048, DNSSEC-secure, fingerprint `sOUiSq9+xyeXpczY9SzI+HLjzU4jZyfQUXGvxjtXmVc=` (2026-11-10, through 1.1.1.1 and
8
-
8.8.8.8). It is not pinned until a real e-mail confirms the template and that Tatra still signs with it, so `withDns()`
9
-
refuses every Tatra banka e-mail as `Unverified`. See [#24](https://github.com/landsman/bank-java/issues/24).
8
+
8.8.8.8). It is not pinned: `withDns()` accepts any key DNSSEC proves `tatrabanka.sk` published, this one included. See [#24](https://github.com/landsman/bank-java/issues/24).
Copy file name to clipboardExpand all lines: .docs/usage.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,8 +128,8 @@ amount, a variable symbol and a date.
128
128
129
129
## Keys
130
130
131
-
`withDns()` needs nothing from you: it validates the bank's key through DNSSEC and accepts only the keys this release
132
-
pins, see [whose key it is](verification.md#whose-key-it-is). The machine's resolver only has to pass DNSSEC records
131
+
`withDns()` needs nothing from you: it validates the bank's key through DNSSEC and, for a bank read from real e-mails,
132
+
accepts only the keys this release pins, see [whose key it is](verification.md#whose-key-it-is). The machine's resolver only has to pass DNSSEC records
133
133
through, as nearly every one does; one that strips them makes every e-mail `Unverified` with the message
134
134
`... is not DNSSEC-secure`. `BankNotifications.pinnedKeys()` lists the pinned keys, for an audit or a line at start-up.
@@ -39,8 +40,8 @@ A signature counts only when all of these hold, besides [whose key it is](#whose
39
40
40
41
- it verifies over the **raw bytes**, recomputed here; an `Authentication-Results` header that came with the message
41
42
is never read, because whoever sent the message could have written it;
42
-
- its `d=` is the domain of the bank the sender names (`airbank.cz` for Air Bank, `fio.cz` for Fio); a signature of any
43
-
other domain is not even looked up;
43
+
- its `d=` is the domain of the bank the sender names (`airbank.cz` for Air Bank, `fio.cz` for Fio, every bank's in
44
+
[banks](banks/README.md)); a signature of any other domain is not even looked up;
44
45
- the headers reading depends on (`Message-ID`, `Subject`, `Content-Type`, `Content-Transfer-Encoding`) come once:
45
46
DKIM signs the last copy of a header and the mail library reads the first, so a copy added above a signed one is
46
47
`Unverified`;
@@ -61,11 +62,14 @@ the bank's, and `BankNotifications.withDns()` does both without being asked:
61
62
root zone's trust anchors (IANA's KSK-2017 and KSK-2024) down, instead of trusting the machine's resolver. An unsigned
62
63
zone, a forged answer, a broken signature chain and a resolver that strips the signatures are all refused.
63
64
`airbank.cz` and `fio.cz` are signed, and so are their key records (2026-11-10).
64
-
-**The key is pinned.** Each bank's key fingerprints are written in the code (`KEY_FINGERPRINTS` in `AirBank` and `FioCz`, the SHA-256
65
-
of the public key), and only those are accepted, whatever DNS says. Forging a key would take breaking DNSSEC *and*
66
-
holding the bank's private key. `BankNotifications.pinnedKeys()` lists them.
67
-
68
-
The price of pinning: **when a bank rotates its key, a release that does not know the new one throws `Unverified` for
65
+
-**The key is pinned**, for a bank read from real e-mails. Its key fingerprints are written in the code
66
+
(`KEY_FINGERPRINTS` in `AirBank` and `FioCz`, the SHA-256 of the public key), and only those are accepted, whatever
67
+
DNS says. Forging a key would take breaking DNSSEC *and* holding the bank's private key.
68
+
`BankNotifications.pinnedKeys()` lists them. A bank read from public samples pins nothing, so DNSSEC alone decides:
69
+
any key its domain publishes is accepted, a newsletter sender's included if it signs as the bank.
70
+
71
+
Only Air Bank and Fio pin keys today; the banks read from public samples pin none until a real e-mail shows their
72
+
selector, see [banks](banks/README.md). The price of pinning: **when a bank rotates its key, a release that does not know the new one throws `Unverified` for
69
73
that bank's e-mails** until you upgrade. Nothing is lost, the e-mails are still there to read again; `.github/workflows/keys.yml`
70
74
compares the pins with DNS every day and opens an issue the day a bank publishes another key, so a release follows.
0 commit comments