Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Encrypted cloud backup (password) #429

Closed
talmahaj opened this issue Jun 9, 2020 · 14 comments · Fixed by #510
Closed

[Feature] Encrypted cloud backup (password) #429

talmahaj opened this issue Jun 9, 2020 · 14 comments · Fixed by #510
Assignees

Comments

@talmahaj
Copy link

talmahaj commented Jun 9, 2020

See parent

@nyarian nyarian self-assigned this Jun 25, 2020
nyarian added a commit to nyarian/wallet-android that referenced this issue Jun 26, 2020
Set AES key size to 256 bit and change digest algorithm to SHA-256
Implement CBC block cipher mode
Salt the password used to derive the AES key
Change key derivation algorithm to PBKDF2 and hashing to HMAC-SHA1
Add a decryption routine to the AES
@Tas4tari
Copy link

Tas4tari commented Jul 3, 2020

@nyarian Enter password screen design to go in the Restore flow: https://app.zeplin.io/project/5dbdf1a40bdfd3832e35c9c5/dashboard?seid=5ef40c39f47783a0be5cc238

@Tas4tari
Copy link

Tas4tari commented Jul 3, 2020

@nyarian
Kutsal: i think we have to also input the existing password for a password change

i'm guessing it would just add another text field before the first one, but we need the copy for that one too

Design from Tal: https://app.zeplin.io/project/5dbdf1a40bdfd3832e35c9c5/screen/5efed93db9928c41744f9b07

@Tas4tari
Copy link

Tas4tari commented Jul 3, 2020

@nyarian Question to Tal based on the following video: https://drive.google.com/file/d/1ESslgcc4yqKapcrt8PrWSRBkJINRtqOl/view

Question:
You can see that there is, like, no animation for the options show up

it's a little bit more complex here: the fade in animation that shows all the backup options after signing in starts, but right after that the app receives the info that the last backup was successful and intents to hide the "back up now" button, again, with an (fade-out) animation, so it cancels the currently running (fade in) animation to aviod conflicts and starts the fade out, which is kinda unseen because the view didn't even appear in the first place

how do you want this to behave? fading in all the other options and fading out the "back up now" concurrently, silently and quickly hiding the "back up now" button, or something else?

Response:"
Fading in all the other options and fading out the "back up now" concurrently" --> would this make it look like what @SerhiiShovkoplias has on iOS? I think the fade-in looks pretty nice there. Or would it be different due to the conflict you mention?

Andri
well, backing up is a kinda long process in the video Sergii sent, so the fade in has all the necessary time to complete and fade out starts only after fade in animation is completed

@Tas4tari
Copy link

Tas4tari commented Jul 3, 2020

Received from Tal:
As for the last case you guys brought up on standup today (@kukabi I think it was you who explained it?) around add/change pw and the next backup having to be tied together as far as success/failure, what do you think of retrying 3 times and then displaying the relevant error message while keeping user on the select password screen? This way they can resolve whatever the issue is and get back to that screen to try to save again once they return to the app. If for whatever reason they close the app altogether and reopen it, they'll have to start over again, but it won't be unexpected because they never got the feedback that their password was successfully saved (or had any reason to think it might've been, e.g. if they were sent back to the prior screen)

@nyarian
Copy link
Contributor

nyarian commented Jul 3, 2020

Applied opinionated reasoning to the animation: it just runs sequential now - first it completely fades in, then the "back up now" option is being hidden with fade out if it should. I think it is be the behavior user expects, but if you have another opinion on this, then ping me :)

@kutsal
Copy link

kutsal commented Jul 7, 2020

@Tas4tari I don't think I'm the "Kutsal" you need to chime in on this. I think you meant @kukabi based on contributors :)

@kukabi kukabi self-assigned this Jul 13, 2020
@Tas4tari
Copy link

@kukabi @nyarian Please see added requirement and design as discussed in stand up:
Added Requirement:
Password Error message:

  • Error should only appear once first password field is no longer in focus (that is, once user taps out of it, usually in order to enter it again in the pw confirmation field)
  • Design: http://zpl.io/VxzWw4X

I have also updated the parent ticket with this
cc @talmahaj

@Tas4tari
Copy link

Tas4tari commented Jul 16, 2020

Testing on Huawei P30 lite, app version: v0.3.0-jnLibs-0.15.2
A few notes on what I have picked up thus far from testing:
@kukabi @nyarian

Testing Videos on Beta:
Create Password: https://drive.google.com/file/d/10wiuqSeO2jgQe-JQl3oP44vQmdiayInM/view?usp=sharing
Change Password: https://drive.google.com/file/d/1x2uFpPtHGQ56qVWdCNTbVD769m2-om1n/view?usp=sharing
Restore Encrypted Wallet: https://drive.google.com/file/d/1ejZi7d8vaA7N2PBT1QNokh0tw8-8H-DL/view?usp=sharing
No internet: https://drive.google.com/file/d/1Eg1VJL-c_cF1xcoSnXMw_zQvmCn3uguH/view?usp=sharing
Restore unencrypted wallet: https://drive.google.com/file/d/1IB22RElFvjg_xjFyTcfVbt0dUYEnUqVI/view?usp=sharing

@Tas4tari
Copy link

Tickets have been created for the following:

All other UI issues listed have already been addressed by @nyarian

@Tas4tari
Copy link

@nyarian Will the UI fixes from above that you have already completed, be merged in for testing before the release or will it go with the next release

kukabi added a commit that referenced this issue Jul 20, 2020
Backup & Restore UI fixes according to the Natasha's comment in #429
@Tas4tari
Copy link

Tas4tari commented Jul 24, 2020

Tested on Huawei P30 Lite, App version: v0.3.0-jnLibs-0.16.0:
Retest list:

@Tas4tari
Copy link

Tested unsuccessfully:

The text states "Create Password" and not "Create a Password"

SerhiiShovkoplias added a commit to SerhiiShovkoplias/wallet-ios that referenced this issue Jul 24, 2020
SerhiiShovkoplias added a commit to SerhiiShovkoplias/wallet-ios that referenced this issue Jul 24, 2020
kukabi added a commit that referenced this issue Jul 27, 2020
…TA button enabled/disabled fix #474. Settings and backup settings screen backup state display fix #509.
kukabi added a commit that referenced this issue Jul 27, 2020
…TA button enabled/disabled fix #474. Settings and backup settings screen backup state display fix #509.
kukabi added a commit that referenced this issue Jul 27, 2020
…TA button enabled/disabled fix #474. Settings and backup settings screen backup state display fix #509.
kukabi added a commit that referenced this issue Jul 27, 2020
…TA button enabled/disabled fix #474. Settings and backup settings screen backup state display fix #509.
@kukabi kukabi reopened this Jul 27, 2020
@Tas4tari
Copy link

Tested successfully on Huawei P30 Lite, using the Regular release apk, password field has changed to reflect the correct text as per the design:
photo_2020-07-27 15 13 36

@Tas4tari
Copy link

Tested successfully on the Beta release
photo_2020-07-28 10 49 59

stringhandler pushed a commit to tari-project/wallet-ios that referenced this issue Sep 15, 2021
* #107
moved all NSLocalizedStrings to the language file and replaced the names in the swift code with slugs.

* Only sync after starting wallet. Updated lib.

* aes cbc encryption\decryption with initial vector + password salting
aes encription tests

* FFI function for partial backup. New completed TX direction function.

* Add sentry bread crumbs. Additional tor logging. Tor config change.

* UI implementation for autobackup wallet
wallet backup error handling
atomic cases handling
added password screen for verify before change backup password and for restore wallet

* Background auto backups will continue after app is closed

* added scheduling for auto backup
added changes to background backups

* added removing backup when "iCloud Backups" switch turn off. It's also has influence on fix wrong mark on settings screen

* hotfix, fixed getting last backup when restore wallet

* added class for Backup that contains needs properties that improve usage logic

* Lowering tor version. Retain cycle check for tor callback. Lib version bump.

* Copy fix

* added tests for backup and restore wallet
added mock for iCloud services (download and upload)
added able to immediately creation backup if backup is scheduled
fixed creation backup failure while app start after terminate

* #443
#446
added redirect user to splash screen after receive "no backups" error while restoring wallet
added able to send bug report from settings screen

* fixed error while restore wallet after terminate and start application

* Log base node by name. Keep reusing the last working BN.

* Backup prompt modals

* Fixes git recognising localized strings as a binary file

* fixed wallet unit tests error

* Only sync with a basenode after to successfully connects

Version bump

* added password length validation

* Partial backups FFI update

* fixed problem with test folder

* added creation partial backup if wallet is not encrypted

* Wait for wallet to restart instead of showing user errors

* fixed test for partial backup. Fixed paths to test directory

* fixed date format for last successfull backup
fixed display error description for create wallet backup failure
fixed splash screen elements sequence and spacing
fixed error when user cant enter password after biometric auth error
addded transition to backup menu after set backup password

* auto-backup time interval changed to 1 min
correctness for password of first field is higher than confirmation and should be fixed first by user. (changed warning behavior)
changed password length warning
added Out of date label if users last backup failed or not valid backup.
last backup label and able to change password while backup is scheduled

* added restoring backup settings after restore wallet

* added new scheduled icon

* added tx list status bar messages for backup states
disabled iCloud backup if user disabled iCloud Drive from phone settings

* Backup prompt logic tweak

* Lib wallet update

* #500
tari-project/wallet-android#429
#508

* Transaction list redesign

Refactoring table sections into one sorted list

Transaction cell text wrapping

* #500
#506
#507
#509
#510
#512
#513
#515
added check for network connection speed

* #506

* Reduces the upload backup timeout period to 20 secs. Changes Rincewind network display name to Testnet.

* implemented tab bar app navigation

* fixed backup and restore unit tests

* autobackup hotfix
fixed: "modal window with backup fail message shows only on settings screen"
removed triggering a backup when direct/s&f send fails

* fixed transition to home screen after sending a tx

* fixed wallet error if user go to background during auth

* #516

* Basic giphy integration

* fixed layout constraints errors for tx table cell
fixed status bar color

* fixed wrong gif height after loading gif
added loading/retry download gif button
fixed gif aspect ratio

* Giphy attribution and showing gif on TX detail view

* Design updates. Slide button triggers after 50% of the distance.

* Scroling TX detail view. Fastlane build bump function.

* Update README.

* Added back iCloud code that was accidentally removed.

Hiding the gift button on the home screen.

Skipping iCloud initialise code to avoid simulator crashes

* Fix gif aspect ratio on add note view

Use high res gem image on splash screen

Fixed gif aspect ration on TX detail view

Add note scroll view with keyboard behavior improvements

Removed bottom inset for TX list

* Backup prompt copy fix

* Tor version update

* Balance labels spacing fix

Fixed height and icon offsets of tab bar

Allow the floating panel to higher for phones without a notch

Pod updates

* Giphy panel fix and tor version lowered

* A possible fix for the startup/connection change Tor crash bug.

* TX cell design tweaks

* Removing the need for the wallet to be started for logging to be done through FFI

* Including missing cancelled transactions in new full list

* Emoji id component polish and improvements. Covers #550.

* Fixes a bug where condensed emoji id showed on top of the the Giphy search view controller in add note screen #560. File and variable name improvements.

* Updated gem icon

Removed balance label kerning

Fixed flashing purple retry button

Stops things from animating on the add recipient view just before it navigates away

* added loading state for addNote screen after finish sliding send button
added show/hide animation for giphy carousel on addNote screen

* Sends user back to transaction list after a send error (was sending to add recipient screen). Profile screen QR code container polish. Emoji Id view animation and look improvement. Made the emoji id scrollable in paste emoji id banner of add recipient screen.

* Persisting tor identity to iOS keychain

* Standardized on bottom buttons

Slide to send button bottom padding fix

Only show "loading gif" when there is an actual gif

* A possible fix for the bug that causes the app to get stuck at the sending screen after a failed send attempt.

* 1) added reusable cells for transactions list. Usage of reusable cells allows to avoid blinking of cells as much is possible. Some times method dequeueReusableCell returnts cell not for current indexPath and we can see blinking. We can't avoid that because GPHMediaView has micro delay for set new media.
2) added updating transaction timestamp in real time

* Updated Tor port. Updated lib version.

* added app version on the debug menu when shaking the device

* prompt modal do not show up if  iCloud backup is on

* fixed overlaps if status labels during animation

* updated behavior for pull to refresh and floating panel
fixed blinking while end refreshing uiRefreshControl
fixed navigation bar animation during move floating panel

* Possible fix for #588.

* amount label horizontal centered
added shadow for navBar on webStore view
empty transactions message vertical centered
splash screen disclaimer cut fix (SE 1st generation)

* wallet-ios #109
Refactor lib and all implementations to use `Tx` instead of `Transaction` everywhere

* wallet-ios #591
fixed unable to navigate to Telegram using the links from within the TTL store

* Using callback_saf_message_received in the notification extension

* Version bump

* wallet-ios #601
keypad design updated according to zeplin
fixed layout constraint conflict

* wallet-ios #604
fixed labels text

* Fix for a bug that caused the app to get stuck at sending screen on a network/send error. Related to #588.

* fixed transaction duplication using Set and override isEqual
improved gif caching. Now cached gif will be released from memory if memory is overstock
added cell prefetch

* fixed layout for gif view and other elements
added shadow for navigation bar if content is "under navigation bar"
removed note placeholder hardcode label and added textview behavior for placeholder

* txList refactoring
pull to refresh logic improvement
list refresh logic improvements

* added new layout rules for iPad version
fixed crashes related to iPad

* fixed empty state for tx list

* added completion for change background view

* fixed tx status value color

* fixed scanVC presentation style for iPad.

* fixed steps duplication (secure and notification) during wallet creation

* fixed tor restarting error
added improvements for OnionManager for implementation bridges changing functionadded able to set custom bridges for Tor configuration
added advanced settings to settings screen
added returning to previous bridges after tor connection error
added progress handling for tor connecting
added able to scan and upload QR code with bridges
added able to go tor website to get bridges

* Better error message for too many faucet requests : ari-project/wallet-ios#616.

* txList blinking fix and behavior improvement
fixed blank screen after tari sending

* Closes a possibly open soft keyboard when the user feedback dialog shows.

* fixed blank screen after sending tari flow

* fixed crash during start app on sim 14. Iobfs4proxy.framework error. Packages of this framework were compiled with gomobile.
framework which was compiled with this Go version does not compatible with sim 14

* FFI lib 0.16.9 update - introduces key-value storage to the wallet library wrapper class and a corresponding test case. Base node list update. Solution for the startup crash bug re #592 #623. Fixes an edge case error in the test case "testRelativeDayValue".

* Set build and version number.

* Delete wallet option in advanced settings. Check network compatibility at app startup and give the user the option to delete wallet and start fresh. Check network compatibility for a restored wallet. Bump build number.

* Bump build number for production release. A small improvement in the wallet deletion flow.

* Refactoring, clean-up and readability improvements pt.1.

* Solution for the startup crash #626.

* Improve tx list refresh control UX. Readability improvements continued.

* Further improvement regarding #626.

* Bump build number and version.

* Added OpenSSL-Universal cocoapod

* Upgrade to libwallet v0.16.12.

* Bump build and version numbers.

* Update wallet lib to v0.16.13. Bump version and build number.

* Wallet Library - Estimate tx fee (#630)

* Added method to wift wrapper for estimating fees

estimateTxFee was added to wallet.swift, which in turn calls wallet_get_fee_estimate in the wallet library.
Linked to PR: tari-project/tari#2526

* Replaced outdated code

Replaces calculateTxFee with estimateTxFee

* Covers the not enough funds error case. Upgrade libwallet version to 0.16.14. Makes default output count = 2.

Co-authored-by: kukabi <kutsalbilgin@gmail.com>

* Bump version and build number.

* Updates for libwallet 0.16.17 - remove Tor identity from transport configuration. Stibbons testnet update. A potential fix for the issue that causes the testnet reset warning dialog to display randomly.

* Clear the user defaults fully on wallet deletion.

* Bump build number.

* README update.

* Added confirmation settings (#633)

Added methods to get and set the number of required confirmations for the wallet.

* Update for the new wallet library base node sync validations functions. Refresh transaction list when the app moves from background to foreground. Support for mined-unconfirmed transaction state. Various refactoring.

* Bump version and build number.

* v0.6.1 b165 - disable push notification extension. Bump build number.

* Enable seed words write down screen and interface it with the FFI. Allow for more decimal places (down to uT) in add amount screen and amount displays.

* Bump build number and version.

* Fixes a rounding bug.

* Added saf message duration (#635)

* Improves background/foreground transitions, Tor connection and wallet management & init/deinit. Fixes the network reset dialog bug. Wallet library 0.16.27 update. Better handling of the FUNDS_PENDING case in the add amount screen. Readability improvements.

* Update dependencies and fix versions for breaking updates in the podfile.

* Update SwiftLint - lint adds a space after each //.

* Bump build number.

* Fixes a bug that caused the GIF to not display in some cases due to invalid resource management logic. Better decimal figures formatting in the transaction list.

* Bump build number.

* Display a tooltip view for the long press action on the Copy Emoji ID button to copy the public key in hex format.

* Display wallet balance in add amount screen.

* Rotate Giphy keywords in add amount screen.

* Fixes a backup bug. Minor copy and UI changes.

* Bump build number.

* Adds confirmation progress display for completed transactions. Fixes failing tests.

* Bump build number and version.

* connection_status

- Added connection status dot on home screen.

* sqlite_encryption - [iOS] Wallet encryption (#637)

- Implemented DB encryption functionality. Now, some fields in local sqlite3 DB will be encrypted. The encryption key (aka passphrase) is generated by the app.
- App will now remove temporary backup files when the app was unable to upload these files to iCloud.
- Added additional value stored in KeyChain - DBPassphraseKey
- Renamed BPKeychainWrapper to AppKeychainWrapper to better indicate the role of this element

* set_base_node - set base node or select from list (ios) - add to advanced settings (#639)

- User now will be able to select the base node from the list from the advanced settings section.
- User can now add and remove custom base node to/from the base node list.

* Bug fixes (#640)

- fixed issue with unresposive status dot on the home screen. Now, it will update it's status even when user change the base node in settings
- fixed issue with reusing cells in settings. Now, cells will not inherit red text and arror color from the reused cell

* Weatherwax network (#641)

- Updated base nodes
- Added a new network option and made it active.

* [iOS] Add in wallet recovery from seed words screens (#642)

- Added restore wallet from seed words flow aviable from the welcome screen

* App version update (#643)

- Updated app and build versions
- Updated TOR framework from 0.4.3.6 to 0.4.6.5

* UI changes on restore walllet scene (#644)

- Updated text colors and texts on the restore walllet from seed words scene.

Co-authored-by: Jason van den Berg <jayvdb1@gmail.com>
Co-authored-by: SerhiiShovkoplias <s.shovkoplyas@newlinetechnologies.net>
Co-authored-by: kutsal kaan bilgin <kutsalbilgin@gmail.com>
Co-authored-by: SerhiiShovkoplias <60744748+SerhiiShovkoplias@users.noreply.github.com>
Co-authored-by: StriderDM <51991544+StriderDM@users.noreply.github.com>
Co-authored-by: Adrian Truszczyński <browncoat@tari.com>
Co-authored-by: Cayle Sharrock <CjS77@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants