Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified apks/pivaa.apk
Binary file not shown.
23 changes: 22 additions & 1 deletion app/src/main/java/com/htbridge/pivaa/EncryptionActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void onClick(View view) {
});


// Decryption AES/CBC/PKCS5Padding
// Encryption AES/CBC/PKCS5Padding (Weak IV)
Button mWeakIVButton = (Button) findViewById(R.id.button_weak_iv);
mWeakIVButton.setOnClickListener(new View.OnClickListener() {

Expand All @@ -115,6 +115,27 @@ public void onClick(View view) {
}

});


// Decryption AES/ECB/PKCS5Padding
Button mDecryptionButton = (Button) findViewById(R.id.button_decryption);
mDecryptionButton.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View view) {
Log.i("htbridge", "Clicked decrypt button");

EditText mDecryptionPlaintextView = (EditText) findViewById(R.id.plaintext_decryption);
EditText mDecryptionCipherView = (EditText) findViewById(R.id.cipher_decryption);

String value = mDecryptionCipherView.getText().toString();
String decryptionResult = Encryption.decryptAES_ECB_PKCS5Padding(value);

mDecryptionPlaintextView.setText(decryptionResult, TextView.BufferType.EDITABLE);
}

});

}

}
2 changes: 0 additions & 2 deletions app/src/main/java/com/htbridge/pivaa/handlers/Encryption.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ public static String encryptAES_ECB_PKCS5Padding(String value) {
*/
public static String decryptAES_ECB_PKCS5Padding(String encryptedBase64) {
try {
byte[] IV = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
IvParameterSpec iv = new IvParameterSpec(IV);

byte[] key = {
1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1
Expand Down