Differences

This shows you the differences between two versions of the page.

Link to this comparison view

smd:laboratoare:08_v_temp [2019/04/22 09:57]
vasile.cosovanu Added Task 3
smd:laboratoare:08_v_temp [2019/04/22 09:58] (current)
vasile.cosovanu [Task 3 - Generate and Verify HMAC (4p)]
Line 35: Line 35:
  
 ===== Tasks ===== ===== Tasks =====
-In this lab we create an app that ...+
  
 ==== Task 1 - Sign the application (3p) ==== ==== Task 1 - Sign the application (3p) ====
Line 56: Line 56:
 ==== Task 3 - Generate and Verify HMAC (4p) ==== ==== Task 3 - Generate and Verify HMAC (4p) ====
  
-Add 2 activities ​to the project. Include an **EditText** and a **Button** in the first activity. When the user types a text and presses the button, it will send the text to the second activity through an intent (**putExtra**). In the second activity, get the message from the Intent and display it in the **TextView**. ​+Add an activity ​to the project. Include an **EditText** and a **Button** in the first activity. When the user types a text and presses the button, it will send the text to the second activity through an intent (**putExtra**). In the second activity, get the message from the Intent and display it in the **TextView**. ​
  
 In the first activity generate a symmetric key using **KeyGenerator** for //​HmacSha256//​ algorithm. Save this key in a Singleton (that can be accessed from both activities). Then generate the HMAC of the text introduced by the user (using **Hmac** with HmacSha256 algorithm) and send the HMAC along with the initial message (through the Intent). In the second activity, obtain the HMAC from the Intent, obtain the Singleton, get the symmetric key and recompute the HMAC. If the HMAC is valid (equal with the recomputed one), Display the message "Data is unmodified"​. ​ In the first activity generate a symmetric key using **KeyGenerator** for //​HmacSha256//​ algorithm. Save this key in a Singleton (that can be accessed from both activities). Then generate the HMAC of the text introduced by the user (using **Hmac** with HmacSha256 algorithm) and send the HMAC along with the initial message (through the Intent). In the second activity, obtain the HMAC from the Intent, obtain the Singleton, get the symmetric key and recompute the HMAC. If the HMAC is valid (equal with the recomputed one), Display the message "Data is unmodified"​. ​
smd/laboratoare/08_v_temp.1555916256.txt.gz ยท Last modified: 2019/04/22 09:57 by vasile.cosovanu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0