Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Commit

Permalink
Disable encrypted backups
Browse files Browse the repository at this point in the history
Encrypted backups are poorly implemented (both by TWRP for padding a
password with zeros to achieve an AES key and openaes for using
non-standard CBC) and not to be trusted. Do not give users a false
sense of security by offering this option. Remove the ability to use
openaes to encrypt backups, but still allow already openaes-encrypted
backups to be restored.

Ref: TeamWin/Team-Win-Recovery-Project#817

Change-Id: Ibc1802372d8caa8c475039e66fb08ce163df27e9
  • Loading branch information
mdmower committed Feb 27, 2017
1 parent f213398 commit 5fb04e2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions gui/theme/common/landscape.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@

<text style="text_m">
<conditions>
<condition var1="tw_include_encrypted_backup" var2="1"/>
<condition var1="tw_include_encrypted_backup" var2="999"/>
<condition var1="tw_encrypt_backup" var2="0"/>
</conditions>
<placement x="%col1_x_right%" y="%row3_y%"/>
Expand All @@ -1654,7 +1654,7 @@

<text style="text_m">
<conditions>
<condition var1="tw_include_encrypted_backup" var2="1"/>
<condition var1="tw_include_encrypted_backup" var2="999"/>
<condition var1="tw_encrypt_backup" var2="1"/>
</conditions>
<placement x="%col1_x_right%" y="%row3_y%"/>
Expand Down
12 changes: 6 additions & 6 deletions gui/theme/common/portrait.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1570,7 +1570,7 @@

<button style="tab">
<conditions>
<condition var1="tw_include_encrypted_backup" var2="1"/>
<condition var1="tw_include_encrypted_backup" var2="999"/>
<condition var1="tw_encrypt_backup" var2="0"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
Expand All @@ -1584,7 +1584,7 @@

<button style="tab">
<conditions>
<condition var1="tw_include_encrypted_backup" var2="1"/>
<condition var1="tw_include_encrypted_backup" var2="999"/>
<condition var1="tw_encrypt_backup" var2="1"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
Expand Down Expand Up @@ -1681,7 +1681,7 @@

<button style="tab">
<conditions>
<condition var1="tw_include_encrypted_backup" var2="1"/>
<condition var1="tw_include_encrypted_backup" var2="999"/>
<condition var1="tw_encrypt_backup" var2="0"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
Expand All @@ -1695,7 +1695,7 @@

<button style="tab">
<conditions>
<condition var1="tw_include_encrypted_backup" var2="1"/>
<condition var1="tw_include_encrypted_backup" var2="999"/>
<condition var1="tw_encrypt_backup" var2="1"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
Expand Down Expand Up @@ -1806,7 +1806,7 @@

<button style="tab">
<conditions>
<condition var1="tw_include_encrypted_backup" var2="1"/>
<condition var1="tw_include_encrypted_backup" var2="999"/>
<condition var1="tw_encrypt_backup" var2="0"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
Expand All @@ -1820,7 +1820,7 @@

<button style="tab">
<conditions>
<condition var1="tw_include_encrypted_backup" var2="1"/>
<condition var1="tw_include_encrypted_backup" var2="999"/>
<condition var1="tw_encrypt_backup" var2="1"/>
</conditions>
<placement x="%tab3_col3_x%" y="%row1_y%" w="%tab3_width%" h="%tab_height%"/>
Expand Down
8 changes: 4 additions & 4 deletions gui/theme/common/watch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2030,7 +2030,7 @@

<button>
<conditions>
<condition var1="tw_include_encrypted_backup" var2="1"/>
<condition var1="tw_include_encrypted_backup" var2="999"/>
<condition var1="tw_encrypt_backup" var2="0"/>
</conditions>
<placement x="%btn4_col2_x%" y="%row11_y%"/>
Expand All @@ -2045,7 +2045,7 @@

<button>
<conditions>
<condition var1="tw_include_encrypted_backup" var2="1"/>
<condition var1="tw_include_encrypted_backup" var2="999"/>
<condition var1="tw_encrypt_backup" var2="1"/>
</conditions>
<placement x="%btn4_col2_x%" y="%row11_y%"/>
Expand Down Expand Up @@ -2168,7 +2168,7 @@

<text style="text_m">
<conditions>
<condition var1="tw_include_encrypted_backup" var2="1"/>
<condition var1="tw_include_encrypted_backup" var2="999"/>
<condition var1="tw_encrypt_backup" var2="0"/>
</conditions>
<placement x="%col1_x_right%" y="%row4a_y%"/>
Expand All @@ -2177,7 +2177,7 @@

<text style="text_m">
<conditions>
<condition var1="tw_include_encrypted_backup" var2="1"/>
<condition var1="tw_include_encrypted_backup" var2="999"/>
<condition var1="tw_encrypt_backup" var2="1"/>
</conditions>
<placement x="%col1_x_right%" y="%row4a_y%"/>
Expand Down

0 comments on commit 5fb04e2

Please sign in to comment.