The invention provides a routing origin
authorization encoding and decoding method and
system based on dynamic subtree division, and the specific implementation scheme of the encoding method is as follows: a relying party synchronizes ROA data from an RPKI
database and analyzes an
authorization information set {lt, Prefix, ASNgt,...}, and divides the
authorization information set into subsets based on ASN; respectively constructing an
IP prefix binary tree for each subset to maintain authorization information; the relying party sets a PDU format based on a communication protocol between the relying party and the
router; taking the minimum pre-estimated coding length as a sub-tree division basis to obtain an optimal sub-tree division scheme of each
IP prefix binary tree; coding a sub-tree containing an authorized node in each
IP prefix binary tree to obtain N lt; the method comprises the following steps of: selecting a template, namely, a template, Prefix, MaxLength and AuthStategt; n is greater than or equal to 1; and constructing N PDUs, and writing the
data information in the N triads. According to the technical scheme provided by the invention, on the premise of ensuring the security and
accessibility of the inter-domain routing
system, the transmission,
verification and storage overhead of ROA data in the RPKI
system can be reduced.