Commit Graph

1764 Commits

Author SHA1 Message Date
akwizgran
90af176810 Use BLAKE2s for hashing, key derivation and signatures.
SHA-256 is still used for password-based key derivation (will be replaced with Argon2) and Fortuna.
2015-12-31 17:42:11 +00:00
akwizgran
6d2ef508d3 Merge branch '189-blake2s' into 'master'
BLAKE2s implementation

Implementation is based on the BLAKE2b implementation from BouncyCastle, and is
therefore licensed under the BouncyCastle license (which will make future
upstreaming of the code easier).

Closes #189.

See merge request !39
2015-12-31 16:06:53 +00:00
akwizgran
affba07baa Added BLAKE2s test to Ant build file. 2015-12-31 16:04:58 +00:00
str4d
d5b347e6c9 BLAKE2s implementation
Implementation is based on the BLAKE2b implementation from BouncyCastle, and is
therefore licensed under the BouncyCastle license (which will make future
upstreaming of the code easier).
2015-12-31 16:01:33 +00:00
akwizgran
2dee821f3c Updated Ant build file for automated tests. 2015-12-31 12:05:12 +00:00
akwizgran
01dc4fb996 Merge branch '176-setupactivity-warnings-api10' into 'master'
Fix SetupActivity warnings for API 10

Closes #176.

The manual setting of the error message color also (strangely) stops the message from disappearing every second character. I'm not complaining ^_^

I guessed that the text color problem probably stopped occurring from API 14 (at the big 4.0 overhaul), but it would be great if someone could confirm.

See merge request !40
2015-12-31 12:03:44 +00:00
akwizgran
50b941e50e Show strength meter when password entry has focus.
Also fixed some IME action issues on Android 2.3.
2015-12-31 12:00:42 +00:00
str4d
9b1dacfe97 Use TextInputLayout from the Design Support Library to display errors 2015-12-31 11:36:59 +00:00
str4d
981903aa57 Migrate SetupActivity to XML 2015-12-31 11:36:27 +00:00
str4d
64e63fa0c2 Enable StrengthMeter to be defined in XML 2015-12-31 11:36:26 +00:00
akwizgran
b1f2f7d120 Merge branch '198-briar-recycler-view' into 'master'
Create custom BriarRecyclerView and use it for the contact list.

It is a common pattern to have a list with an empty view and a progress bar.
This commit introduces a custom BriarRecyclerView and uses it for the
contact list.

No more manually hiding and showing empty views and progress bars is
necessary when using the new BriarRecyclerView instead of RecyclerView.

Please note that this conflicts with !44 at the moment and needs to be
implemented for !36 once merged.

Closes #198

See merge request !45
2015-12-31 11:32:58 +00:00
akwizgran
d0092ee5aa Merge branch '9-conversation-view' into 'master'
Overhauled Conversation View with Message Bubbles

The Conversation View now uses a RecyclerView with conversation bubbles
in alternating colors and vector drawables to indicate message state.

The conversation bubbles have been taken from Telegram
and can be replaced by a UX designer later.
There's also a special bubble for unread messages,
so they are not overlooked when they come in delayed.

This commit also addresses #9, because message text can
now be selected and copied. This is done by using

    android:textIsSelectable="true"

which only works for API level 11 or higher.

If we want copy and paste on lower API levels,
additional measures have to be implemented.

See merge request !36
2015-12-31 11:20:29 +00:00
Torsten Grote
970560c21e address issues with new BriarRecyclerView found in review 2015-12-30 13:22:23 -02:00
Torsten Grote
f309cb36d4 Create custom BriarRecyclerView and use it for the contact list.
It is a common pattern to have a list with an empty view and a progress bar.
This commit introduces a custom BriarRecyclerView and uses it for the
contact list.

No more manually hiding and showing empty views and progress bars is
necessary when using the new BriarRecyclerView instead of RecyclerView.

Please note that this conflicts with !44 at the moment and needs to be
implemented for !36 once merged.

Closes #198
2015-12-30 11:50:15 -02:00
akwizgran
e17765e80f Merge branch '199-use-fab-for-adding-new-contact' into 'master'
Add a floating action button (FAB) in the contact list

The button hides itself when you scroll down the list of contacts
and shows again when you scroll up.

To properly color the button, the accent color has been defined.
It uses the same color as the action bar (primary color).
I leave it to a UX designer to adapt the color scheme.

Please note that the design support library was used.
It includes the app-compat library, so this has been removed
from the `build.gradle` file.

Closes #199

See merge request !44
2015-12-30 13:36:38 +00:00
Torsten Grote
a51726f147 This introduces a floating action button (FAB) in the contact list.
The button hides itself when you scroll down the list of contacts
and shows again when you scroll up.

To properly color the button, the accent color has been defined.
It uses the same color as the action bar (primary color).
I leave it to a UX designer to adapt the color scheme.

Please note that the design support library was used.
It includes the app-compat library, so this has been removed
from the `build.gradle` file.

Closes #199
2015-12-30 10:58:05 -02:00
str4d
b46f779003 Merge branch '197-improve-readability-transport-status-bar' into 'master'
Do not show green text for enabled transports, use only green icons.

This addresses part of #197 and is a fairly small change.

See merge request !43
2015-12-29 12:34:01 +00:00
Torsten Grote
7f29aede97 Do not show green text for enabled transports, use only green icons.
This addresses part of #197
2015-12-29 10:23:17 -02:00
Torsten Grote
880333f094 address issues found so far in code review 2015-12-28 17:04:03 -02:00
akwizgran
590d1e8ded Merge branch '7-password-activity' into 'master'
Show home screen if user backs out of password activity

This borrows a technique from @grote's crash reporter patch to fix #7. If the user presses the back button in PasswordActivity, the home screen is shown. Previously, pressing the back button removed PasswordActivity from the back stack, causing the next activity in the back stack to spawn another PasswordActivity.


See merge request !41
2015-12-28 18:09:00 +00:00
akwizgran
d7f204019d Merge branch 'use-xsalsa20-poly1305' into 'master'
Use XSalsa20-Poly1305 instead of AES-GCM for transport encryption and password storage.

This patch integrates @str4d's new authenticated cipher implementation. It depends on !18.

See merge request !35
2015-12-28 18:07:20 +00:00
Torsten Grote
e98d4f2260 Use a RecyclerView for the ConversationView and
properly notify the view adapter of dataset changes
in order to avoid invalidating the entire dataset when not absolutely necessary.

This change also shows unread messages in a different color,
so users do not fail to notice delayed messages.
2015-12-28 14:49:03 -02:00
Torsten Grote
68cd1ff28c New Conversation View in XML
It now uses conversation bubbles in alternating colors
and vector drawables to indicate message state.

The conversation bubbles have been taken from Telegram
and can be replaced by a UX designer later.

This commit also addresses #9, because message text can
now be selected and copied. This is done by using

    android:textIsSelectable="true"

which only works for API level 11 or higher.

If we want copy and paste on lower API levels,
additional measures have to be implemented.
2015-12-28 14:49:03 -02:00
Torsten Grote
83a2552a7c Merge branch 'contact-list-activity' into 'master'
Use a RecyclerView for the Contact List

This is the first RecyclerView in the project. I am using a SortedList to keep the contacts sorted by latest activity.

Also, I removed the icon footer and moved the icon into ActionBar. I did the same with the long-press contact deletion action which eventually will move to the new contact details activity.

Several icons have been replaced by vector drawables and all the views are now defined in XML.

See merge request !38
2015-12-28 16:40:36 +00:00
Torsten Grote
6a954021ae Sort contacts by latest activity.
When you receive a message from a contact,
it will be moved to the top of the list with a nice animation.
Also with this commit, not the entire data set is invalidated each time data changes,
but only the parts of the data that really require an update.

Furthermore, the ContactListItemComparator that is not needed anymore is
removed.
2015-12-28 14:37:23 -02:00
Torsten Grote
4bcd204687 Use a RecyclerView for the Contact List 2015-12-28 14:37:23 -02:00
akwizgran
d46ad6cc14 Merge branch '189-dbexecutor' into 'master'
Inject dbExecutor as ExecutorService

Closes #188, despite the branch name. :0)

See merge request !33
2015-12-28 16:33:59 +00:00
akwizgran
bbf1770d8d Show home screen if user backs out of password activity. 2015-12-28 11:42:37 +00:00
akwizgran
435efc3b8c Merge branch '7-crash-handling' into 'master'
Small Improvements for Crash Handling Activities

This relates to #7 and closes #193

See merge request !37
2015-12-28 11:22:25 +00:00
str4d
efa7ac00ea Merge branch '190-key-manager-duplicates' into 'master'
Fix off-by-one error in key rotation

Fixes #190.

See merge request !32
2015-12-23 19:41:21 +00:00
Torsten Grote
1dd7a35685 Small Improvements for Crash Handling Activities 2015-12-21 17:11:46 -02:00
akwizgran
9135feb92f Merge branch '166-tor-0.2.7.6' 2015-12-21 14:49:06 +00:00
akwizgran
d635cede57 Upgrade Tor to 0.2.7.6. #166 2015-12-21 14:42:39 +00:00
Torsten Grote
08caa527cd Merge branch '191-transport-icon-labels' into 'master'
Put labels below transport icons

This prevents the labels from wrapping on small screens. Fixes #191.

See merge request !34
2015-12-21 13:04:14 +00:00
Torsten Grote
28b7fd96a9 Merge branch '186-update-dashboard-icons' into 'master'
Update dashboard icons when resuming activity.

Fixes #186. 

The issue is that DashboardActivity doesn't receive events while it's paused. This appears to be device-dependent because it depends on the relative speed of resuming the activity vs delivering the event. If the activity resumes quickly enough, it will register its event listener and catch the event. If not, it won't update its icons until it's recreated, e.g. by rotating the screen.

See merge request !31
2015-12-21 13:00:51 +00:00
akwizgran
ec3eafbb3e If Bluetooth was enabled, reuse invitation connection. 2015-12-18 16:47:01 +00:00
akwizgran
73bb3b0065 Fixed return value of process(). 2015-12-18 16:47:01 +00:00
akwizgran
fc897bd1b9 Use XSalsa20-Poly1305 instead of AES-GCM. #111 2015-12-18 16:47:01 +00:00
akwizgran
6fab0e87e0 Better variable names. 2015-12-18 16:47:01 +00:00
akwizgran
a3ecd93999 Merge branch '169-blake2' into 'master'
Switch KDF from SHA-256 to Blake2. #169

The BTP spec calls for Blake2s, but there's no Java implementation available. I suggest we go with Blake2b for now. If it turns out to be a performance bottleneck on 32-bit platforms we can consider implementing Blake2s and merging it upstream.

This depends on !13.

See merge request !21
2015-12-18 16:43:45 +00:00
akwizgran
a63384a91f Merge branch '111-stream-encryption' into 'master'
Stream encryption for BTP version 2. #111

This patch implements the stream header from the BTPv2 spec (https://code.briarproject.org/akwizgran/briar/wikis/BTP).

This merge request depends on !13.

See merge request !18
2015-12-18 16:43:06 +00:00
akwizgran
ad0972877b Updated TestStreamEncrypter/Decrypter. 2015-12-18 13:34:02 +00:00
akwizgran
e6eb1707a9 Set STREAM_HEADER_IV_LENGTH to 24 to match spec. 2015-12-18 13:34:02 +00:00
akwizgran
f2efe7f2ea Implement stream header for BTPv2. #111 2015-12-18 13:34:02 +00:00
akwizgran
c9e2bf7efb Put labels below transport icons. #191 2015-12-18 11:58:26 +00:00
akwizgran
aab62aaffc Added sanity checks to catch bugs like #190. 2015-12-18 11:31:11 +00:00
akwizgran
d2dea42cec Fixed off-by-one error in key rotation. #190 2015-12-18 11:29:13 +00:00
akwizgran
b7fe802d5d Inject dbExecutor as ExecutorService. #189 2015-12-18 11:28:18 +00:00
akwizgran
8084d08a3a Update dashboard icons when resuming activity. #186 2015-12-17 17:52:16 +00:00
akwizgran
766179ac97 Use new UI/DB interface in BriarService. 2015-12-17 16:56:58 +00:00