This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| What is the first RRC message that a UE sends to the gNB in the 5G Standalone registration procedure? | |
| What is the the response RRC message that a gNB sends to the UE upon receiving RRCSetupRequest message? | |
| Which RRC message that a UE sends to the gNB with the NAS Registration Request as a dedicated NAS message field? | |
| What is the NAS message used to request the UE identity in 5G standalone registration procedure? | |
| What is the NAS message that a UE uses to respond to the NAS identity request? | |
| Which NAS message is used to initiate the authentication procedure with the UE in 5G Standalone registration procedure? | |
| What is NAS message a UE uses to respond to the authentication challenge? | |
| Which NAS message is sent to the UE to inform the selected NAS security algorithm? | |
| What is the NAS message a UE uses to signal the completion of the NAS security procedure? | |
| What is the RRC message a gNB sends to a UE to activate the access stratum security? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "@context": "https://www.w3.org/2018/credentials/v1", | |
| "id": "vc12345", | |
| "type": [ | |
| "VerifiableCredential", | |
| "MonashCredential" | |
| ], | |
| "issuer": "MonashUniversity", | |
| "issuanceDate": "2023-05-30T22:46:21.067940", | |
| "credentialSubject": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| JsonObject jsonRepresentation = VCUtil.getJsonRepresentation(verifiableCredential); | |
| System.out.println(jsonRepresentation); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| VerifiableCredential verifiableCredential = new VerifiableCredential.Builder() | |
| .credential(credential) | |
| .metadata(credentialMetaData) | |
| .proof(proof) | |
| .build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Proof proof = new Ed25519Signature2020(dateTime, credential, credentialMetaData, URI.create("linkToPublicKey"), "assertion", keyPair.getPrivate()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("Ed25519"); | |
| byte[] keyBytesForSender = Mnemonic.toKey("sponsor ride say achieve senior height crumble promote " + | |
| "universe write dove bomb faculty side human taste paper grocery robot grab reason fork soul above " + | |
| "sphere"); | |
| keyPairGenerator.initialize(256, new FixedSecureRandom(keyBytesForSender)); | |
| KeyPair keyPair = keyPairGenerator.generateKeyPair(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var dateTime = LocalDateTime.now(); | |
| CredentialMetaData credentialMetaData = new CredentialMetaData.Builder() | |
| .id("vc12345") | |
| .issuer("MonashUniversity") | |
| .additionalType("MonashCredential") | |
| .issuanceDate(dateTime) | |
| .expirationDate(dateTime.plusYears(1)) | |
| .build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Credential credential = new Credential.Builder() | |
| .credentialSubject(credentialSubject) | |
| .build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CredentialSubject credentialSubject = new CredentialSubject(); | |
| credentialSubject.addClaim("name", "Thusitha Dayaratne"); | |
| credentialSubject.addClaim("job", "Research Fellow"); | |
| credentialSubject.addClaim("university", "Monash University"); | |
| credentialSubject.addClaim("id", "0123456789"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Sender encrypt the message | |
| Cipher cipher = Cipher.getInstance("AES"); | |
| cipher.init(Cipher.ENCRYPT_MODE, secretKeySender); | |
| byte[] cipherText = cipher.doFinal(message.getBytes(StandardCharsets.UTF_8)); | |
| //Receiver decrypt the message | |
| Cipher cipher = Cipher.getInstance("AES"); | |
| cipher.init(Cipher.DECRYPT_MODE, secretKeyReceiver); | |
| String decryptMsg = new String(cipher.doFinal(cipherText)); |
NewerOlder