RPKI and ROA
RPKI (Resource Public Key Infrastructure) is an infrastructure for cryptographically verifying the right to announce IP prefixes in BGP. An ROA (Route Origin Authorization) is a signed RPKI object stating which autonomous system may announce a prefix.
Definition
RPKI (Resource Public Key Infrastructure) is a public key infrastructure that makes it possible to cryptographically confirm who holds given internet resources — blocks of IP addresses and autonomous system (AS) numbers. The RPKI architecture is described in RFC 6480 “An Infrastructure to Support Secure Internet Routing”. RPKI certificates mirror the address allocation hierarchy: from the organisations that manage address pools to the operators and companies to which addresses have been allocated.
An ROA (Route Origin Authorization) is a signed RPKI object in which the holder of a prefix declares which AS is authorised to announce that prefix in BGP. The ROA profile is described in RFC 9582 “A Profile for Route Origin Authorizations (ROAs)”, which replaced RFC 6482. Recommendation no. 2026/67a/5 of the Polish Government Plenipotentiary for Cybersecurity defines RPKI as a system for cryptographically verifying the right to announce prefixes in BGP, and an ROA as an indication of which autonomous system is authorised to announce a given address block.
Without RPKI, any operator can announce any prefix in BGP, and its neighbours have to take its word for it. This is a source of route hijacking incidents and mistakes that cut entire networks off from the internet.
How route origin validation works
What an ROA contains
An ROA contains three key pieces of information:
- the AS number authorised to announce,
- the list of prefixes the authorisation covers,
- the maximum prefix length (maxLength) — an optional field specifying down to what length the AS may announce more specific subnets of the block.
Validation states
Operators’ routers fetch validated RPKI data (usually via a validator) and compare the routes received in BGP against it. RFC 6811 “BGP Prefix Origin Validation” defines three route states:
- Valid — an ROA exists that matches the prefix and the origin AS,
- Invalid — an ROA covers the prefix, but none matches the origin AS or the prefix length,
- NotFound — no ROA covers the prefix.
Networks that perform validation usually drop routes in the Invalid state. The more operators do so, the harder it is to hijack someone else’s prefix — but the more painful a mistake in your own ROAs becomes.
RPKI and ROA when diverting to scrubbing
RPKI is directly linked to DDoS protection. When traffic is diverted to a scrubbing center via BGP, the scrubbing provider’s AS starts announcing the organisation’s prefix. If the prefix is covered by an ROA naming only the organisation’s AS, the provider’s announcement will be Invalid and validating networks will drop it. The diversion will work only partly or not at all — exactly when it is needed most.
That is why point 12b of recommendation 2026/67a/5 advises that an entity using scrubbing prepare in advance an ROA in RPKI for the provider’s AS and a letter of authorisation (LOA), so as not to lose time on formalities and rejected announcements during an attack. An LOA (Letter of Authorization) is a formal authorisation for the scrubbing center provider to announce the organisation’s prefixes in BGP.
The maxLength trap
During an attack, scrubbing providers often announce a more specific prefix than the one the organisation announces day to day — so that it wins the longest-match selection. If the ROA for the provider’s AS has a maxLength equal to the length of the base prefix, such a more specific announcement will be Invalid. The maxLength value therefore has to be agreed with the provider before an attack. At the same time, an overly generous maxLength opens the way to route hijacking by impersonating the authorised AS — so it is set as narrowly as possible.
We prepare the ROA and LOA for the scrubbing provider in advance as part of the DDoS protection and scrubbing center service.
RPKI and ROA from a company’s perspective
Who creates the ROA depends on who holds the address space:
- A company with provider-independent (PI) addresses and its own AS creates ROAs itself, in the system of the organisation that allocated its addresses. It should maintain an ROA for its own AS and, before activating a scrubbing service, also for the provider’s AS, with an agreed maxLength.
- A company using addresses assigned by its operator (PA) does not create ROAs — its internet service provider does, as the holder of the pool. This is a question for the provider: does it publish ROAs for customer addresses, and will it prepare an ROA for the scrubbing provider if the customer uses one?
It is also worth asking the operator whether it performs route origin validation itself. An operator that drops Invalid routes protects its customers against their traffic being hijacked as a result of someone else’s mistake or attack.
The most common practical problem is ROAs nobody remembers. Changing internet provider, moving a prefix to a new location or cancelling a scrubbing service all require updating ROAs, and in many companies only one person has access to the resource management system. It is therefore worth assigning responsibility for ROAs to a specific role, describing it in the traffic diversion procedure and checking the validation state of your own prefixes after every change — publicly available validators show whether a route is Valid, Invalid or NotFound.
Limitations of RPKI
- RPKI verifies the origin, not the whole path. An ROA confirms which AS may announce a prefix, but does not protect against impersonation of that AS further along the BGP path.
- Configuration errors are costly. Outdated ROAs after changing provider, or a maxLength that is too narrow, can cause legitimate routes to be dropped.
- Effectiveness depends on validation. An ROA only helps in networks that perform origin validation and drop Invalid routes.
Summary
RPKI makes it possible to cryptographically confirm the right to announce prefixes, and an ROA states which AS may announce a given address block and down to what length. Route origin validation (RFC 6811) protects against traffic hijacking, but requires carefully maintained ROAs. Before diverting to a scrubbing center, an ROA for the provider’s AS and an LOA must be prepared in advance — otherwise the provider’s announcements will be rejected during an attack.