Skip to content

[Feature] Add Korean Corporate Registration Number (KR_CRN) recognizer #2177

Description

@developer0hye

Is your feature request related to a problem? Please describe.

Presidio covers both the tax-oriented business identifier and the company-registry identifier for several jurisdictions — AU_ABN/AU_ACN for Australia, DE_VAT_ID/DE_HANDELSREGISTER for Germany, SE_ORGANISATIONSNUMMER for Sweden, SG_UEN for Singapore. For Korea only the tax-oriented half exists: KR_BRN (사업자등록번호, Business Registration Number) was added in #1822, but the Corporate Registration Number (법인등록번호, CRN) — the 13-digit identifier the court registry office assigns to every legal entity upon incorporation — has no recognizer. Korean contracts, invoices and corporate filings routinely contain both numbers, so documents anonymized with the current recognizer set keep the CRN, which is enough to re-identify the entity (and its representative and registered address) through the public corporate registry.

Describe the solution you'd like

A KrCrnRecognizer (KR_CRN entity) following the existing Korean recognizer conventions:

  • Format AAAABB-CCCCCCD (13 digits, optionally hyphenated 6-7): registry office code (4), corporate type code (2), serial number (6), check digit (1). The corporate type codes are defined in attached Table 3 of the Supreme Court rule on registration numbers (법인 및 재외국민의 부동산등기용등록번호 부여에 관한 규칙): 11–15 commercial companies, 21–22 civil-law corporations, 31–53 special-law corporations, 71 other, 81–86 foreign corporations. Constraining these two digits also reduces overlap with KR_RRN, which shares the hyphenated 6-7 shape.
  • Check digit validation: (10 - (alternating 1,2 weighted sum of the first 12 digits mod 10)) mod 10. Note that Supreme Court Rule No. 3173 (effective January 31, 2025) expanded the serial number to 7 digits and abolished the check digit, so validation should return None rather than False on mismatch — the same approach KrRrnRecognizer takes for post-2020 RRNs whose serial is random.
  • Registered in default_recognizers.yaml with enabled: false and country_code: kr for both ko and kr, like the other Korean recognizers.

Describe alternatives you've considered

Extending KrBrnRecognizer to also match CRNs — rejected because the two numbers have different formats, different issuers, different checksums, and consumers may want to act on them separately (e.g. keep BRN, redact CRN).

Additional context

The CRN is public-registry information rather than personal data, same as the ACN/UEN/Handelsregister identifiers already supported; the value is in de-identifying documents that mention legal entities.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions