Biometric Signatures on iOS

A digital signature’s biometric properties are stored via PDFSignatureBiometricProperties. This information includes things like whether or not the signature was created with a stylus, the size of the signee’s finger, and the timing and pressure information that was collected while writing the signature. Ultimately, this data can be used to create solutions that provide a higher grade of security than traditional digital signatures do. A digital signature can only contain biometric data if an ink signature was used to create it.

The following biometric properties and data points can be captured and stored in a digital signature from the signing user interface (UI):

  • pressureList:

    Set to the first, the middle, and the last floating-point intensity values of the created ink signature.

  • timePointsList:

    Set to an array of the first, the middle, and the last timestamps during the creation of the ink signature. The timestamps correspond to the values in pressureList and were taken at the same point in time. They are saved as boxed TimeInterval values and set to Date.timeIntervalSince1970 at the time of the drawing.

  • touchRadius:

  • inputMethod:

    Set to the most recently used input method of the created ink signature.

You can provide biometric data using a custom PDFSignatureBiometricProperties object in the SigningConfiguration instance. This biometric data is then saved alongside the digital signature:

// Generate the biometric data.
let biometricData = PDFSignatureBiometricProperties(pressureList: pressureList, timePointsList: timepoints, touchRadius: radius, inputMethod: .applePencil)

let signingConfiguration = SigningConfiguration(dataSigner: privateKey, certificates: certificates, biometricData: biometricData)

Collecting Biometric Data

You can access biometric properties from a SignatureFormElement object after the signing process is complete by using SignatureFormElement.signatureBiometricProperties(_:), like so:

let signedSignatureFormElement: SignatureFormElement = ...
var privateKey: PrivateKey = ...
let pkcs12: PKCS12 = ...
let (privateKey, _) = try await pkcs12.unlockCertificateChain(withPassword: password)
let biometricProperties = signedSignatureFormElement.signatureBiometricProperties(privateKey)
PSPDFSignatureFormElement *signedSignatureFormElement = ...
PSPDFPrivateKey *privateKey = ...
PSPDFPKCS12 *pkcs12 = ...
[pkcs12 unlockWithPassword:password done:^(PSPDFX509 *x509, PSPDFPrivateKey *pkey, NSError *err) {
    privateKey = pkey;
}];

PSPDFSignatureBiometricProperties *biometricProperties = [signedSignatureFormElement signatureBiometricProperties:privateKey];