From 4cadf3be3e12e5dc4b51dd14e3cd51e8232eac10 Mon Sep 17 00:00:00 2001 From: olf Date: Fri, 16 Oct 2020 05:11:15 +0200 Subject: [PATCH 1/9] Post release version increase --- rpm/crypto-sdcard.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rpm/crypto-sdcard.spec b/rpm/crypto-sdcard.spec index b2ee154b..5f3d23c4 100644 --- a/rpm/crypto-sdcard.spec +++ b/rpm/crypto-sdcard.spec @@ -1,6 +1,6 @@ Name: crypto-sdcard Summary: Configuration files for unlocking and mounting encrypted SD-cards automatically -Version: 1.2.5 +Version: 1.2.6 # Stop evaluating the Release tag content (only set it) and cease including it in git tags since v1.2.0, # in order to satisfy OBS' git_tar. Consequently switch to a three field semantic versioning scheme for # releases and their git tags. @@ -8,7 +8,7 @@ Version: 1.2.5 # the third field of the Version. # But the Release tag is now merely used to monotonically count up through all releases (starting from 1). # Note that no other release identifiers shall be used. -Release: 46 +Release: 47 Group: System/Base Distribution: SailfishOS Vendor: olf @@ -30,7 +30,7 @@ Requires: udisks2 >= 2.8.1+git5-1.12.1.jolla # ultimately decided to use both in this case: Requires: sailfish-version >= 3.2.1 # Omit anti-dependency on future, untested SFOS versions, until a known conflict exists: -# Requires: sailfish-version < 3.9.9 +Requires: sailfish-version < 3.4.0 Requires: cryptsetup >= 1.4.0 Conflicts: crypto-sdcard_sbj From 29d871ec4c59cbe64494c8d1c86d4c127eec6611 Mon Sep 17 00:00:00 2001 From: olf Date: Fri, 16 Oct 2020 15:52:26 +0200 Subject: [PATCH 2/9] Update crypto-sdcard.spec --- rpm/crypto-sdcard.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/crypto-sdcard.spec b/rpm/crypto-sdcard.spec index 5f3d23c4..7e482f0f 100644 --- a/rpm/crypto-sdcard.spec +++ b/rpm/crypto-sdcard.spec @@ -1,6 +1,6 @@ Name: crypto-sdcard Summary: Configuration files for unlocking and mounting encrypted SD-cards automatically -Version: 1.2.6 +Version: 1.3.1 # Stop evaluating the Release tag content (only set it) and cease including it in git tags since v1.2.0, # in order to satisfy OBS' git_tar. Consequently switch to a three field semantic versioning scheme for # releases and their git tags. @@ -8,7 +8,7 @@ Version: 1.2.6 # the third field of the Version. # But the Release tag is now merely used to monotonically count up through all releases (starting from 1). # Note that no other release identifiers shall be used. -Release: 47 +Release: sfos321 Group: System/Base Distribution: SailfishOS Vendor: olf From 27c5b396f76c17d0cfc7269cb1163e9b6e0c8f05 Mon Sep 17 00:00:00 2001 From: olf Date: Sun, 18 Oct 2020 04:58:39 +0200 Subject: [PATCH 3/9] Update crypto-sdcard.spec --- rpm/crypto-sdcard.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/crypto-sdcard.spec b/rpm/crypto-sdcard.spec index 7e482f0f..db58777b 100644 --- a/rpm/crypto-sdcard.spec +++ b/rpm/crypto-sdcard.spec @@ -8,7 +8,7 @@ Version: 1.3.1 # the third field of the Version. # But the Release tag is now merely used to monotonically count up through all releases (starting from 1). # Note that no other release identifiers shall be used. -Release: sfos321 +Release: 1.sfos321 Group: System/Base Distribution: SailfishOS Vendor: olf From 917f2befce6a31c2008a032d07e3a53cfdeca58b Mon Sep 17 00:00:00 2001 From: olf Date: Wed, 21 Oct 2020 03:44:19 +0200 Subject: [PATCH 4/9] Update crypto-sdcard.spec --- rpm/crypto-sdcard.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/crypto-sdcard.spec b/rpm/crypto-sdcard.spec index 55e45c75..a926100f 100644 --- a/rpm/crypto-sdcard.spec +++ b/rpm/crypto-sdcard.spec @@ -36,7 +36,7 @@ Requires: udisks2 >= 2.8.1+git5-1.12.1.jolla # ultimately decided to use both in this case: Requires: sailfish-version >= 3.2.1 # Omit anti-dependency on future, untested SFOS versions, until a known conflict exists: -# Requires: sailfish-version < 3.9.9 +Requires: sailfish-version < 3.4.0 Requires: cryptsetup >= 1.4.0 # Provides the file $(find /lib/modules/ -name qcrypto.ko) on a Jolla 1: Requires: kernel-adaptation-sbj From bdf096d05ce15af275b75b975443c7e9fdf04797 Mon Sep 17 00:00:00 2001 From: olf Date: Wed, 21 Oct 2020 03:50:44 +0200 Subject: [PATCH 5/9] Update crypto-sdcard.spec --- rpm/crypto-sdcard.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/crypto-sdcard.spec b/rpm/crypto-sdcard.spec index a926100f..c1c8c5be 100644 --- a/rpm/crypto-sdcard.spec +++ b/rpm/crypto-sdcard.spec @@ -14,7 +14,7 @@ Version: 1.3.1 # - An optional third field might be used by downstream packagers, who alter the package but want to # retain the exact version number. It shall consist of the packager's name appended with a natural # number greater than zero, e.g "joe8". -Release: 1.sfosABC+qcrypto +Release: 1.sfos321+qcrypto Group: System/Base Distribution: SailfishOS Vendor: olf From 550500fafc3fd88e180310c011ae029f37170b69 Mon Sep 17 00:00:00 2001 From: olf Date: Wed, 21 Oct 2020 04:06:49 +0200 Subject: [PATCH 6/9] Rectify git-oops --- rpm/crypto-sdcard.spec | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/rpm/crypto-sdcard.spec b/rpm/crypto-sdcard.spec index c1c8c5be..3630c1bf 100644 --- a/rpm/crypto-sdcard.spec +++ b/rpm/crypto-sdcard.spec @@ -14,7 +14,7 @@ Version: 1.3.1 # - An optional third field might be used by downstream packagers, who alter the package but want to # retain the exact version number. It shall consist of the packager's name appended with a natural # number greater than zero, e.g "joe8". -Release: 1.sfos321+qcrypto +Release: 1.sfos321 Group: System/Base Distribution: SailfishOS Vendor: olf @@ -38,12 +38,7 @@ Requires: sailfish-version >= 3.2.1 # Omit anti-dependency on future, untested SFOS versions, until a known conflict exists: Requires: sailfish-version < 3.4.0 Requires: cryptsetup >= 1.4.0 -# Provides the file $(find /lib/modules/ -name qcrypto.ko) on a Jolla 1: -Requires: kernel-adaptation-sbj -# Requires: (kernel-adaptation-sbj or droid-hal-l500d or XYZ) Conflicts: crypto-sdcard_sbj -Obsoletes: crypto-sdcard_sbj -Provides: crypto-sdcard_sbj %description %{summary} From d73b92bc0e88cf6e095f34418e67df895715bbe7 Mon Sep 17 00:00:00 2001 From: olf Date: Wed, 21 Oct 2020 04:20:37 +0200 Subject: [PATCH 7/9] Correct git-oops: disable qcrypto here --- systemd/system/cryptosd-plain@.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd/system/cryptosd-plain@.service b/systemd/system/cryptosd-plain@.service index 99cb53fb..603afc8e 100644 --- a/systemd/system/cryptosd-plain@.service +++ b/systemd/system/cryptosd-plain@.service @@ -10,7 +10,7 @@ AssertFileNotEmpty=/etc/crypto-sdcard/%I.key Type=oneshot RemainAfterExit=yes # For devices, which need the qcrypto kernel module loaded to support modern cryptographic schemes as e.g. XTS: -ExecStartPre=/sbin/modprobe qcrypto +# ExecStartPre=/sbin/modprobe qcrypto ExecStart=/bin/sh -c 'cat /etc/crypto-sdcard/%I.key | /usr/sbin/cryptsetup -h sha1 -s 256 -c aes-xts-plain --allow-discards --type plain open /dev/%I %I' # ExecStartPost=chgrp disk /dev/mapper/%I # Moved to udev rules 96-cryptosd ExecStop=/usr/sbin/cryptsetup close %I From 5f463977c3ca803e3014d41adea97c3054d07a53 Mon Sep 17 00:00:00 2001 From: olf Date: Wed, 21 Oct 2020 04:21:34 +0200 Subject: [PATCH 8/9] Correct git-oops: disable qcrypto here --- systemd/system/cryptosd-luks@.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd/system/cryptosd-luks@.service b/systemd/system/cryptosd-luks@.service index 0a1ad920..642c314c 100644 --- a/systemd/system/cryptosd-luks@.service +++ b/systemd/system/cryptosd-luks@.service @@ -10,7 +10,7 @@ AssertFileNotEmpty=/etc/crypto-sdcard/%I.key Type=oneshot RemainAfterExit=yes # For devices, which need the qcrypto kernel module loaded to support modern cryptographic schemes as e.g. XTS: -ExecStartPre=/sbin/modprobe qcrypto +# ExecStartPre=/sbin/modprobe qcrypto # For various reasons (dependency on udisks2, allow discards etc.), do not use "udisksctl unlock --key-file", call cryptsetup directly: ExecStart=/usr/sbin/cryptsetup --allow-discards -d /etc/crypto-sdcard/%I.key luksOpen /dev/%I %I # ExecStartPost=chgrp disk /dev/mapper/%I # Moved to udev rules 96-cryptosd From f179344a7089e1139b8c1cf6c3ba4c0b79dc1948 Mon Sep 17 00:00:00 2001 From: olf Date: Wed, 21 Oct 2020 04:23:39 +0200 Subject: [PATCH 9/9] Update README.md --- README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 692c121c..8de8ba69 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,10 @@ -# crypto-sdcard (qcrypto edition) +# crypto-sdcard #### Configuration files for unlocking and mounting encrypted SD-cards, using udev, udisks2, polkit and systemd. -This edition is provided specifically for devices (e.g. Jolla 1 phones aka "sbj", but maybe also other older devices using Qualcomm SoCs), which need Qualcomm's `qcrypto` kernel module to be loaded in order to support modern cryptographic schemes as e.g. XTS. Currently only the Jolla 1 is supported, because I own one and hence can test on it.
-The Jolla C / Intex Aquafish (l500d), Inoi R7 (p4903), Jala Accione and Accione P may also need the explicit loading of the `qcrypto` kernel module, but I need the output of these two commands (can be done as a regular user, no need for root) to correctly define a dependency to the RPM (for each of these devices, as I do not have access to any of these), which contains qcrypto.ko:
-`rpm -qf $(find /lib/modules/ -name qcrypto.ko)`
-`ssu s # Delete your "Device UID" before posting!`
-For all other devices (i.e., on those where `find /lib/modules/ -name qcrypto.ko` yields nothing), the [generic edition](https://github.com/Olf0/crypto-sdcard) shall be used. +Note that for devices (e.g. Jolla 1 phones aka "sbj", but maybe also other older devices using Qualcomm SoCs as the Jolla C / Intex Aquafish (l500d), Inoi R7 (p4903), Jala Accione and Accione P), which need Qualcomm's `qcrypto` kernel module to be loaded in order to support modern cryptographic schemes as e.g. XTS, a [separate edition is provided](https://github.com/Olf0/crypto-sdcard/tree/qcrypto). Extensively tested with systemd 225 (which includes udev), udisks2 2.7.5 and polkit 0.104 (e.g. SailfishOS 2.2 / 3.x, which provides aforementioned environment).
-Built RPMs are available in the [release section](https://github.com/Olf0/crypto-sdcard/releases) and for easy installation under SailfishOS at [OpenRepos](https://openrepos.net/content/olf/crypto-sdcard_sbj). +Built RPMs are available in the [release section](https://github.com/Olf0/crypto-sdcard/releases) and for easy installation under SailfishOS at [OpenRepos](https://openrepos.net/content/olf/crypto-sdcard). The necessary steps to prepare an SD-card (or any other removable storage) are described at [Together.Jolla.com](https://together.jolla.com/question/195850/guide-creating-partitions-on-sd-card-optionally-encrypted/).
Note that the "key"-files reside unencrypted on fixed, internal mass storage, as mobile devices usually have only a single user, who unlocks the whole device.