How to decrypt apple app attestation object in Java ( iOS 14 and above )?

Hey! I spent hours to figure this out. Let’s keep it short and quick now.

This package is the thing:

Add the dependency in pom.xml.


Compile the code to fetch the new dependency

mvn compile

Add the following code anywhere you find suitable



import java.util.Base64;

public String getDecodedAppAttestObject(String encryptedAppAttestObjectBase64) throws CborParseException {

    var decodedByteArray = Base64.getDecoder().decode(encryptedAppAttestObjectBase64);
    CborMap decodedAppAttestObjectByteArray = CborMap.createFromCborByteArray(decodedByteArray);
    var decodedAppAttestObject = decodedAppAttestObjectByteArray.toString();
    return decodedAppAttestObject;

That’s it! The function can now decode your attestation object. Hope it helps, thank you!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s