Opened 4 years ago

Last modified 4 years ago

#1688 open defect

Rekey on copy

Reported by: zzz Owned by:
Priority: minor Milestone: undecided
Component: router/general Version: 0.9.22
Keywords: Cc:
Parent Tickets: Sensitive: no

Description

Duplicate routers in the network would be bad. But determining when we're running on new hardware is difficult.

Subtickets

Change History (3)

comment:1 Changed 4 years ago by zzz

Discussion re: Android:

<zzz> http://arstechnica.com/gadgets/2015/10/android-6-0s-auto-backup-for-apps-perfect-data-backup-for-the-1-5/
<str4d> zzz: I'll be supporting that in Bote, because it provides a great way to not lose emails and identities
<zzz> str4d the concern is you get dup routers in the network
<zzz> so then you say, oh, i'll store the device ID, and rekey on startup if it doesn't match
<zzz> and then you fall down this rabbit hole http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id
<str4d> Or, I just only back up the i2pbote folder
<zzz> the new backup system is all-or-none
<str4d> My reading of that is it is possible for app devs to choose what data gets backed up
<zzz> unless i misread it

  • str4d rereads

<str4d> "This new system just dumps the app's entire contents of /data/data/[app-name] (minus the cache and temporary files) into Google Drive."
<str4d> "Developers do get some control over the new system. They can tweak exactly what gets backed up if they want to…"
<zzz> ok, everything by default
<str4d> https://developer.android.com/training/backup/autosyncapi.html shows how to specify a backup methodology in the manifest
<str4d> So we can just include the i2pbote/ folder and be done
<str4d> Then the only risk is that the Bote Destination gets multihomed, which isn't a biggie IMHO
<zzz> I'd include everything except the router keys and anything else bad
<str4d> Oh wait
<str4d> Yeah
<zzz> I see you're still targeting 19
<zzz> so it's not happening yet, you must bump to 23 to get it
<str4d> Just exclude targeted parts - router keys, local dest
<str4d> I know
<str4d> But there is more to test
<zzz> yeah would not be fun for testing
<str4d> Wait, 19?
<str4d> Bote targets API 22
<zzz> AndroidManifest?.xml in i2p.android.base
<str4d> I was talking about Bote
<str4d> But yeah, I2P Android could be done this way too
<str4d> And the value in AndroidManifest? should be removed
<zzz> same issues apply for bote w/ embedded router and the standard router package
<str4d> The one to look at is in app/build.gradle, which is taken from gradle.properties
<str4d> As of 0.9.22 I build I2P Android against API 23, but target API 22
<zzz> so it is enabled?
<str4d> So not enabled
<str4d> The big thing I need to test with API 23 is the optional permissions thing
<str4d> Should never be a problem for INTERNET, but I2P also uses ACCESS_NETWORK_STATE and RECEIVE_BOOT_COMPLETED


But also affects users copying ~/.i2p on desktop. Users can copy the whole install. On systems with systemd, we could use /etc/machine-id, or perhaps hash(ID + username). We would store it in router.config, then compare at restart.

comment:2 Changed 4 years ago by zzz

Note that in Android, as str4d explains above, we can configure the restore to omit certain files. Any detection/rekey logic would be for desktop only.

comment:3 Changed 4 years ago by str4d

Status: newopen
Note: See TracTickets for help on using tickets.