Skip to content

Commit

Permalink
Merge pull request #40 from Olf0/correct-git-oops
Browse files Browse the repository at this point in the history
Correct git oops
  • Loading branch information
Olf0 authored Oct 21, 2020
2 parents b325c8b + 0b6b222 commit 9b5efbf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.<br />
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:<br />
`rpm -qf $(find /lib/modules/ -name qcrypto.ko)`<br />
`ssu s # Delete your "Device UID" before posting!`<br />
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).<br />
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/).<br />
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.<br />
Expand Down
2 changes: 1 addition & 1 deletion systemd/system/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion systemd/system/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9b5efbf

Please sign in to comment.