Don’t Trust Apple To Verify Someone — Then Use Contact Key Verification?

Like it or not, Apple has always had the best security on their devices — including having specialised hardware which looks after the…

Don’t Trust Apple To Verify Someone — Then Use Contact Key Verification?

Like it or not, Apple has always had the best security on their devices — including having specialised hardware which looks after the security of the device and of the user. Now, Apple has added contact key verification on the iPhone, and which can be used to authenticate the person you are speaking with — without using Apple’s identity services. For this, it generates a unique public code, and where each person can compare the codes generated in order to verify those involved in a conversation on the iMessage app. An important feature is that it is possible to advertise a Public Verifiable Code over social media.

Basically, in iMessages, there is now a “Verify Contact” link for the contact, and when the other person clicks on Verify Contract, a contact verification code is shown. The verification on each device is then compared, and if they match, the identities have been verified. The verification is done out-of-band:

Ref [here]

With iMessage, we integrate the Apple Identity Directory Service, and which will store the public key of the key pair for all the end-to-end encryption services. The private key is used to decrypt data, and also to digitally sign for data, and where the public key either encrypts data, or verifies signatures. The private keys are stored in a secure enclave, such as with the T2 chip in the Macbook. Overall, the problem we have is how to verify the public key of a given user. This could be done by advertising the public key on a trusted website, or on Apple’s Identity Directory Service. But, do you actually trust Apple’s Identity Directory Service, as it may have been compromised with a backdoor from nation states?

With Contact Key Verification, we have an additional key for the devices which connect to iCloud. It has a one-way function with your iMessage public key, in order to produce a signature. This signature can only be produced by trusted devices, and cannot be forged. The master key is then only stored in the secure enclaves on devices and never revealed to Apple. This signature is then converted into an eight-digit code, and if two people see the same code, they have been verified, and not by Apple’s Identity Directory Service.

Key Transparency and Verifiable Random Functions

The method that Apple uses is Key Transparency (CT), which is derived from Certificate Transparency. The method uses Verifiable Random Functions (VRF) to stop user identities from being revealed [here]. A Verifiable Random Function (VRF) allows the owner of a private key the ability to create a hashed value of data, while anyone with the associated public key can prove the validity of the hash. Thus the owner of the private key can produce H(x from H(x)=fpriv(x), while someone with the public key can prove that H(x) is the hash of x. This is similar to the approach of keyed cryptography hashes but uses public key encryption for the key operation. Apple has advanced Key Transparency so that it works across all of the user’s devices.

So what?

For the day-to-day user, there will be no need for Contact Key Verification, but for those who need serious levels of cybersecurity, this will be a godsend. It is great to see many of the methods that were developed for blockchain architectures now being scaled into a non-blockchain world.

Here is an outline of VRFs:

https://medium.com/asecuritysite-when-bob-met-alice/verifiable-random-functions-4563d6eb17ab