<?xml version='1.0' encoding='utf-8'?>
<!--
  FFFD1F - Utopia patient card (generation 3 demo).

  The card Aurora General Hospital, Republic of Utopia, gives each patient it registers. Any
  service of the hospital scans it to find the patient's file by number; the patient's name and
  date of birth are shown only once the patient has entered their PIN, so a lost card says
  nothing about its holder.

  Ported from the BioSeal SDK test corpus (bioseal-sdk test/manifests/gen3/health/ffd025.xml,
  the Argon2id variant; FFD023 and FFD024 are the same card with an HMAC_SHA256 PIN and a
  HEADER salt, not ported). What generation 3 shows:
  - bs:OwnerAuthentication with one PIN method whose reference value is derived with
    Argon2id (RFC 9106), a memory-hard function: Memory 19 MiB, 2 passes, 1 lane, under a
    per-card random salt held in the payload (Salt PAYLOAD_FIELD, 16 bytes). The public seal's
    PIN costs far more to brute-force than with SHA256 or PBKDF2, without any issuer key;
  - personal data withheld until the patient is authenticated (VDS_OWNER_AUTHENTICATED);
  - the card's own validity (bs:DocumentValidity, issue and expiry dates; the SDK test case
    gives the seal a 5-year lifetime instead) and a lost card revoked by its patient number
    (bs:VdsRevocation Batch), both added for the demo;
  - NO custom presentation view: the SDK's generic view lays the card out from the manifest
    in English and French.
  PIN digest of the sample (test PIN 1234), see README.md:
    Argon2id(password = "1234", salt = pin_salt, t = 2, m = 19456 KiB, p = 1, 32 bytes)
--><Manifest xmlns="https://gov.otentik.codes/schemas/manifest/v3" xmlns:ext="urn:vdsic:manifest:extensions:3" xmlns:bs="urn:id3:bioseal:manifest:extensions:3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1">
    <Id>FFFD1F</Id>
    <Version>1</Version>
    <Name>
        <Value xml:lang="en">Patient card</Value>
        <Value xml:lang="fr">Carte patient</Value>
    </Name>
    <Description>
        <Value xml:lang="en">Demo: hospital patient card whose holder's name is shown only after the patient enters a PIN, protected with Argon2id.</Value>
        <Value xml:lang="fr">Démo : carte patient d'un hôpital dont le nom du titulaire n'est affiché qu'après la saisie de son code PIN, protégé par Argon2id.</Value>
    </Description>
    <Schema>
        <Payload>
            <Fields>
                <String name="patient_id">
                    <StringConstraints>
                        <MinLength>12</MinLength>
                        <MaxLength>12</MaxLength>
                        <Pattern>^PC[0-9]{10}$</Pattern>
                        <Encoding>C40</Encoding>
                    </StringConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Patient number</ext:Value>
                        <ext:Value xml:lang="fr">Numéro de patient</ext:Value>
                    </Extension>
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:Placeholder xml:lang="en">PC2611240044</bs:Placeholder>
                        <bs:Placeholder xml:lang="fr">PC2611240044</bs:Placeholder>
                        <bs:ErrorText xml:lang="en">PC followed by 10 digits.</bs:ErrorText>
                        <bs:ErrorText xml:lang="fr">PC suivi de 10 chiffres.</bs:ErrorText>
                    </Extension>
                    <Extension xsi:type="bs:DisplayHintExtensionType">
                        <bs:Emphasis>PRIMARY</bs:Emphasis>
                    </Extension>
                </String>
                <String name="name">
                    <StringConstraints>
                        <MaxLength>40</MaxLength>
                    </StringConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Name</ext:Value>
                        <ext:Value xml:lang="fr">Nom</ext:Value>
                    </Extension>
                    <Extension xsi:type="ext:VisibilityExtensionType">
                        <ext:Condition xsi:type="ext:ApplicationConditionType">
                            <ext:Value>VDS_OWNER_AUTHENTICATED</ext:Value>
                        </ext:Condition>
                    </Extension>
                    <Extension xsi:type="bs:DisplayHintExtensionType">
                        <bs:Emphasis>PRIMARY</bs:Emphasis>
                    </Extension>
                </String>
                <Date name="date_of_birth">
                    <DateConstraints>
                        <NotBefore>1900-01-01</NotBefore>
                        <From>1900-01-01</From>
                    </DateConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Date of birth</ext:Value>
                        <ext:Value xml:lang="fr">Date de naissance</ext:Value>
                    </Extension>
                    <Extension xsi:type="ext:VisibilityExtensionType">
                        <ext:Condition xsi:type="ext:ApplicationConditionType">
                            <ext:Value>VDS_OWNER_AUTHENTICATED</ext:Value>
                        </ext:Condition>
                    </Extension>
                    <Extension xsi:type="bs:DateFormatExtensionType">
                        <bs:Pattern>%d/%m/%Y</bs:Pattern>
                        <bs:Pattern xml:lang="en">%d %b %Y</bs:Pattern>
                    </Extension>
                </Date>
                <String name="hospital">
                    <StringConstraints>
                        <MaxLength>40</MaxLength>
                    </StringConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Hospital</ext:Value>
                        <ext:Value xml:lang="fr">Établissement</ext:Value>
                    </Extension>
                    <Extension xsi:type="bs:DefaultValueExtensionType">
                        <bs:Static>Hôpital général d'Aurora</bs:Static>
                    </Extension>
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:HelpText xml:lang="en">Pre-filled with your hospital; change it for a card issued for another site of the group.</bs:HelpText>
                        <bs:HelpText xml:lang="fr">Pré-rempli avec votre établissement ; modifiez-le pour une carte émise pour un autre site du groupe.</bs:HelpText>
                        <bs:Entry>OPERATOR</bs:Entry>
                    </Extension>
                </String>
                <Date name="issue_date">
                    <DateConstraints>
                        <From>2000-01-01</From>
                    </DateConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Date of issue</ext:Value>
                        <ext:Value xml:lang="fr">Date de délivrance</ext:Value>
                    </Extension>
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:Entry>LOCKED</bs:Entry>
                    </Extension>
                    <Extension xsi:type="bs:DefaultValueExtensionType">
                        <bs:Computed>CURRENT_DATE</bs:Computed>
                    </Extension>
                    <Extension xsi:type="bs:DateFormatExtensionType">
                        <bs:Pattern>%d/%m/%Y</bs:Pattern>
                        <bs:Pattern xml:lang="en">%d %b %Y</bs:Pattern>
                    </Extension>
                </Date>
                <Date name="expiry_date">
                    <DateConstraints>
                        <From>2000-01-01</From>
                    </DateConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Valid until</ext:Value>
                        <ext:Value xml:lang="fr">Valable jusqu'au</ext:Value>
                    </Extension>
                    <Extension xsi:type="bs:DateFormatExtensionType">
                        <bs:Pattern>%d/%m/%Y</bs:Pattern>
                        <bs:Pattern xml:lang="en">%d %b %Y</bs:Pattern>
                    </Extension>
                </Date>
                <Binary name="pin_salt">
                    <BinaryConstraints>
                        <MinLength>16</MinLength>
                        <MaxLength>16</MaxLength>
                    </BinaryConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">PIN salt</ext:Value>
                        <ext:Value xml:lang="fr">Sel du code PIN</ext:Value>
                    </Extension>
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:HelpText xml:lang="en">16 random bytes drawn by the issuance service for each card.</bs:HelpText>
                        <bs:HelpText xml:lang="fr">16 octets aléatoires tirés par le service d'émission pour chaque carte.</bs:HelpText>
                        <bs:Entry>PLATFORM</bs:Entry>
                    </Extension>
                    <Extension xsi:type="ext:VisibilityExtensionType">
                        <ext:Condition xsi:type="ext:ApplicationConditionType">
                            <ext:Value>NEVER</ext:Value>
                        </ext:Condition>
                    </Extension>
                </Binary>
                <Binary name="pin_digest">
                    <BinaryConstraints>
                        <MinLength>32</MinLength>
                        <MaxLength>32</MaxLength>
                    </BinaryConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">PIN reference</ext:Value>
                        <ext:Value xml:lang="fr">Référence du code PIN</ext:Value>
                    </Extension>
                    <!-- Computed by the issuance platform from the PIN the patient chooses. -->
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:Entry>PLATFORM</bs:Entry>
                    </Extension>
                    <Extension xsi:type="ext:VisibilityExtensionType">
                        <ext:Condition xsi:type="ext:ApplicationConditionType">
                            <ext:Value>NEVER</ext:Value>
                        </ext:Condition>
                    </Extension>
                </Binary>
                <!-- The issuance service that produced the seal (ext:IssuanceService): the
                     platform writes its CIN, the verifier checks it against the Scheme List.
                     Neither the issuance form (Entry PLATFORM) nor any view (NEVER) shows it. -->
                <String name="issuance_service">
                    <StringConstraints>
                        <MinLength>3</MinLength>
                        <MaxLength>3</MaxLength>
                        <Pattern>^[A-Z0-9]{3}$</Pattern>
                        <Encoding>C40</Encoding>
                    </StringConstraints>
                    <Extension xsi:type="ext:LabelExtensionType">
                        <ext:Value xml:lang="en">Issuance service</ext:Value>
                        <ext:Value xml:lang="fr">Service d'émission</ext:Value>
                    </Extension>
                    <Extension xsi:type="ext:VisibilityExtensionType">
                        <ext:Condition xsi:type="ext:ApplicationConditionType">
                            <ext:Value>NEVER</ext:Value>
                        </ext:Condition>
                    </Extension>
                    <Extension xsi:type="bs:InputHintExtensionType">
                        <bs:Entry>PLATFORM</bs:Entry>
                    </Extension>
                </String>
            </Fields>
        </Payload>
    </Schema>
    <Extensions>
        <Extension xsi:type="ext:PoliciesExtensionType">
            <ext:AuthorizedUsage>
                <ext:oid>1.3.6.1.4.1.51528.1.1</ext:oid>
                <ext:uuid>0945dbd91c8d425685733a4c7eee3a6a</ext:uuid>
            </ext:AuthorizedUsage>
            <!-- No VDSValidityPeriod: the card's validity is the document's
                 (bs:DocumentValidity below), not the seal's. -->
            <bs:CertificateValidity>
                <bs:ExpiryDateGracePeriod><bs:Value>30</bs:Value><bs:Unit>DAYS</bs:Unit></bs:ExpiryDateGracePeriod>
                <bs:RevocationInfoGracePeriod><bs:Value>2</bs:Value><bs:Unit>DAYS</bs:Unit></bs:RevocationInfoGracePeriod>
            </bs:CertificateValidity>
            <!-- A lost card is revoked by its patient number. -->
            <bs:VdsRevocation>
                <bs:Manifest/>
                <bs:Batch>
                    <bs:PayloadField>patient_id</bs:PayloadField>
                </bs:Batch>
            </bs:VdsRevocation>
        </Extension>
        <Extension xsi:type="ext:IssuanceServiceExtensionType">
            <ext:PayloadField>issuance_service</ext:PayloadField>
        </Extension>
        <Extension xsi:type="bs:IssuancePoliciesExtensionType">
            <bs:KeyProtection>
                <bs:MinimumLevel>L1</bs:MinimumLevel>
                <bs:Rationale>
                    <bs:Value xml:lang="en">Demo: signed with a software key; a production issuer declares a stronger level.</bs:Value>
                    <bs:Value xml:lang="fr">Démo : signé avec une clé logicielle ; un émetteur en production déclare un niveau supérieur.</bs:Value>
                </bs:Rationale>
            </bs:KeyProtection>
        </Extension>
        <Extension xsi:type="bs:DocumentValidityExtensionType">
            <bs:NotBefore><bs:PayloadField>issue_date</bs:PayloadField></bs:NotBefore>
            <bs:NotAfter><bs:PayloadField>expiry_date</bs:PayloadField></bs:NotAfter>
        </Extension>
        <Extension xsi:type="bs:AdditionalInformationExtensionType">
            <bs:DataPrivacy>
                <bs:Value xml:lang="en">Anyone who scans the card reads only the patient number, the hospital and the dates. The name and the date of birth are shown only after the patient has entered their PIN. The PIN is never stored, only an Argon2id derivation of it.</bs:Value>
                <bs:Value xml:lang="fr">Quiconque scanne la carte ne lit que le numéro de patient, l'établissement et les dates. Le nom et la date de naissance ne sont affichés qu'après la saisie du code PIN du patient. Le code n'est jamais conservé, seulement une dérivation Argon2id de celui-ci.</bs:Value>
            </bs:DataPrivacy>
            <bs:PointOfContact>
                <bs:Value xml:lang="en">contact@id3.eu</bs:Value>
                <bs:Value xml:lang="fr">contact@id3.eu</bs:Value>
            </bs:PointOfContact>
        </Extension>
        <Extension xsi:type="bs:IssuanceParametersExtensionType">
            <bs:Encoding>BASE45</bs:Encoding>
            <bs:QuietZone>4</bs:QuietZone>
            <bs:Symbology>QRCODE</bs:Symbology>
            <bs:QrcodeParameters>
                <bs:ErrorCorrectionLevel>M</bs:ErrorCorrectionLevel>
                <bs:Version>AUTOMATIC</bs:Version>
            </bs:QrcodeParameters>
            <bs:Caption>
                <bs:Text>AURORA · PATIENT</bs:Text>
                <bs:Position>BOTTOM</bs:Position>
                <bs:Color>#FFFFFF</bs:Color>
                <bs:FontFamily>SANS_SERIF</bs:FontFamily>
                <bs:Style>FRAME</bs:Style>
                <bs:FrameColor>#1F5C99</bs:FrameColor>
                <bs:CornerRadius>8</bs:CornerRadius>
                <bs:FontWeight>700</bs:FontWeight>
            </bs:Caption>
        </Extension>
        <Extension xsi:type="bs:FieldGroupsExtensionType">
            <bs:Group Name="patient" Scope="BOTH">
                <bs:Label xml:lang="en">Patient</bs:Label>
                <bs:Label xml:lang="fr">Patient</bs:Label>
                <bs:Description xml:lang="en">The name and the date of birth are shown once the patient has entered their PIN.</bs:Description>
                <bs:Description xml:lang="fr">Le nom et la date de naissance s'affichent une fois le code PIN du patient saisi.</bs:Description>
                <bs:PayloadField>patient_id</bs:PayloadField>
                <bs:PayloadField>name</bs:PayloadField>
                <bs:PayloadField>date_of_birth</bs:PayloadField>
            </bs:Group>
            <bs:Group Name="card" Scope="BOTH">
                <bs:Label xml:lang="en">Card</bs:Label>
                <bs:Label xml:lang="fr">Carte</bs:Label>
                <bs:PayloadField>hospital</bs:PayloadField>
                <bs:PayloadField>issue_date</bs:PayloadField>
                <bs:PayloadField>expiry_date</bs:PayloadField>
            </bs:Group>
            <bs:Group Name="security" Scope="FORM" Collapsible="true" Collapsed="true">
                <bs:Label xml:lang="en">Patient's PIN</bs:Label>
                <bs:Label xml:lang="fr">Code PIN du patient</bs:Label>
                <bs:Description xml:lang="en">Computed by the platform from the PIN the patient chooses; never shown.</bs:Description>
                <bs:Description xml:lang="fr">Calculés par la plateforme à partir du code PIN choisi par le patient ; jamais affichés.</bs:Description>
                <bs:PayloadField>pin_salt</bs:PayloadField>
                <bs:PayloadField>pin_digest</bs:PayloadField>
            </bs:Group>
        </Extension>
        <!-- The PIN proves the card is the patient's; its reference value is derived with
             Argon2id under the per-card salt pin_salt. -->
        <Extension xsi:type="bs:OwnerAuthenticationExtensionType">
            <bs:Method xsi:type="bs:PinAuthMethodType">
                <bs:PayloadField>pin_digest</bs:PayloadField>
                <bs:MinLength>4</bs:MinLength>
                <bs:MaxLength>6</bs:MaxLength>
                <bs:Protection>
                    <bs:Algorithm>ARGON2ID</bs:Algorithm>
                    <bs:Salt>PAYLOAD_FIELD</bs:Salt>
                    <bs:SaltField>pin_salt</bs:SaltField>
                    <bs:Iterations>2</bs:Iterations>
                    <bs:Memory>19456</bs:Memory>
                    <bs:Parallelism>1</bs:Parallelism>
                </bs:Protection>
            </bs:Method>
            <bs:GrantsConsent>true</bs:GrantsConsent>
            <bs:RequiredMethods>1</bs:RequiredMethods>
        </Extension>
    </Extensions>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"/><ds:Reference URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>+dMfCCxEmW2aV4e62NE35MhjMVFHRu4Au7JoIJUjKAU=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>hQENQtZrjSQYke20bHDN3J5E58Kmw4shozbhEJwOW3XTa5L2L+3hhxNj2WP8oy/oV7L2tbggG41Oc6IbzZnTUg==</ds:SignatureValue><ds:KeyInfo><ds:X509Data><ds:X509Certificate>MIIDODCCAr6gAwIBAgIIHIOg/q3eBccwCgYIKoZIzj0EAwMwPTEdMBsGA1UEAwwUVmlzaWJsZSBTZWFsIFJvb3QgQ0ExDzANBgNVBAoMBklOQ0VSVDELMAkGA1UEBhMCTFUwHhcNMjYwMjA5MTY1NjQ5WhcNMjkwMjA4MTY1NjQ4WjCBjTEYMBYGCgmSJomT8ixkAQEMCENCODBBQjhGMSwwKgYDVQQDDCNpZDMgVGVjaG5vbG9naWVzIC0gT3RlbnRpayBNYW5pZmVzdDEaMBgGA1UECwwRSUQgMyBURUNITk9MT0dJRVMxGjAYBgNVBAoMEUlEIDMgVEVDSE5PTE9HSUVTMQswCQYDVQQGEwJGUjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCYIqSmOgyvlbmslWH0HQypYlKsrvdkuuayp5ZJZ6nOs5DK+6C1z8yR931KeTopU8MVV6XBBAYAbNA6Kv60yRTijggFVMIIBUTAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFCGhTeB27aTBB5FSMvHxKdsfjOdIMEQGCCsGAQUFBwEBBDgwNjA0BggrBgEFBQcwAoYoaHR0cDovL3JlcG9zaXRvcnkuaW5jZXJ0Lmx1L3JjYV9zZWFsLmNlcjBMBgNVHSAERTBDMEEGCSuBKwUDAQEBADA0MDIGCCsGAQUFBwIBFiZodHRwczovL3JlcG9zaXRvcnkuaW5jZXJ0Lmx1L3BvbGljaWVzLzA5BgNVHR8EMjAwMC6gLKAqhihodHRwOi8vcmVwb3NpdG9yeS5pbmNlcnQubHUvcmNhX3NlYWwuY3JsMB0GA1UdDgQWBBSSJnkPffVoLggpgOPuR8IyHqQ0tDAOBgNVHQ8BAf8EBAMCBsAwIgYKKwYBBAGDkkgBAQQUMRIEEBw+dudck0rtjq0s0GzZARIwCgYIKoZIzj0EAwMDaAAwZQIwF2j8rBbAPbYpoGpjpQ6cXAUyqOKu+yDGZ4up11PfQ07OMeq6DVwveQqOYBjEscaOAjEA58KrJAMN7ormVL08W3DT39d/1GXxIeo72N1iArrHGMdMxyihw0sGUBz0XIC90j1F</ds:X509Certificate></ds:X509Data></ds:KeyInfo></ds:Signature></Manifest>