## 4 Results: Proof of Concept
### Identity Management Implementation
#### 4.1.3 Verifiable Presentations (VPs)  
A Verifiable Presentation (VP) is the recommended data format for sharing a Verifiable Credential, as it provides a cryptographic way to prove the DID of the submitting cardholder. To create this presentation, a verification method must be created for the DDo of the Raspberry Pi so that it can sign both the presentation and the issuer when issuing the credential. This presentation follows a semantic structure similar to the Verifiable Credentials, but in this case, it includes the _credentials_ field that contains a list of the credentials to be presented and the _holder_ field that corresponds to the DID of the entity that generated the presentation, among others. VPs allowed the Raspberry Pi to share its VCs with verifiers securely. Each VP included:  
* A challenge: A unique random string to prevent replay attacks;
* A domain: To differentiate requests when identical challenges are issued. The VP's structure was signed cryptographically, enabling verifiers to validate its authenticity independently. This VP is shown in Listing 5. ```
1 VerifiablePresentations:{
2\"@context\":\"[[https://www.w3.org/2018/credentials/v1](https://www.w3.org/2018/credentials/v1)]([https://www.w3.org/2018/credentials/v1](https://www.w3.org/2018/credentials/v1))\",\"type\":\"-\"verifiablePresentation\",\"verifiableCredential\":{
3\"@context\":\"[[https://www.w3.org/2018/credentials/v1](https://www.w3.org/2018/credentials/v1)]([https://www.w3.org/2018/credentials/v1](https://www.w3.org/2018/credentials/v1))\",\"id\":\"[[http://example.edu/credentials/1872](http://example.edu/credentials/1872)]([http://example.edu/credentials/1872](http://example.edu/credentials/1872))\",\"type\":[
4\"VerifiableCredential\",
5\"IoTDeviceCredential\"
6],
7
8\"credentialSubject\":{
9\"id\":\"did:iota:47e5j35 Ag5 wcihGwu7 YKZS2d74 SkawhHGBIGSFap5 iH\",
10\"firmwareVersion\":\"1.2.3\",
11\"macAddress\":\"00:11:122:33:44:55\",
12\"model\":\"RaspberryPi4\",\"name\":\"rp1\",\"serialNumber\":\"123456789\",
13\"),
14\"issuer\":\"did:iota:9 FJX2 qCSEEVSDS6 jTWXBp03 LtMyMH3 wGfHashJype3s\",\"
15\"issuer\":\"2023-03-31T11:17:422\",\"expirationDate\":\"2023-03-31T11:17:422\",\"expirationDate\":\"2023-03-31T11:22:422\",\"credentialStatus\":{
16\"id\":\"did:iota:9 FJX2 qCa2 FeXw2Q86 JTWXBp03 LtMyMH3 wGfHashJype3s#rev-service\",\"type\":\"RevocationBitmap202\",\"revocationBitmapIndex\":\"2\",\"),
17\"proof\":{
18\"type\":\"JcaEd25519 Signature020\",\"verificationMethod\":\"did:iota:\"-\"gFJX2 qCa2 FeXw3 eB5 JTWXBp03 LtMyMH3 wGfHashJype3s#key-issuer\",\"signatureValue\":-\"2 AtImXWQEL6 GhptXZB8 lTvYbdiDABHVwVbBsSHWEB97 tN @mypropVk5J4 hwybM7 xLhkinSnoff_EqMUcpSUALeg\",\"proofPurpose\":\"assertionMethod\"},
19\"holder\":\"did:iota:47e5j35 Ag5 WeiGbuuw7 YKZS2d74 SkawhHGIBGSFsp5 iH\",\"proof\":{
20\"type\":\"JcaEd25519 Signature2020\",\"verificationMethod\":-\"did:iota:47e5j35 Ag5 wcihGwuw7 YKzS2d74 SkawhHG1 dSfSep5 iH#key-rp1\",\"signatureValue\":-\"signatureValue\":-\"signatureValue\":-\"



unlikely event that two verifiers generate the same random challenge, the domain string would differentiate their requests. Once the verifier receives the verifiable presentation, it can perform several checks, including verifying the signature, ensuring that the requested challenge and domain strings are included, verifying that the credential has not expired or been revoked, confirming the relationship between the subject and the owner, and validating details such as the date of issuance. ### Secure Communication and Access Control

This section describes the cryptographic message flow of the IOTA Streams protocol integrated with the Identity module to authenticate the device and control access to the communication channel. The communication required to exchange the necessary messages was implemented using a REST server over the HTTP protocol. This approach was chosen because the participants initially do not know each other and the links created by IOTA Streams need to be shared externally.