pnaven03
Posts: 139
Joined: Thu Feb 16, 2017 5:21 pm

Securing SD card Image by encrypting in raspberry pi 3

Fri Apr 21, 2017 1:55 pm

Hi Team,

We are using Raspberry pi 3 and kernel version Linux raspberrypi 4.4.11-v7+ #888 SMP Mon May 23 20:10:33 BST 2016 armv7l GNU/Linux,How my sdcard image encrypting,this is for the security purpose please any one can help on this.

Regards,
Nv

mattmiller
Posts: 2114
Joined: Thu Feb 05, 2015 11:25 pm

Re: Securing SD card Image by encrypting in raspberry pi 3

Fri Apr 21, 2017 2:34 pm

Short answer is no - cant be done in any way that makes sense.
No way of securing a Pi image on an SD card that is of any practical use.

peterlite
Posts: 720
Joined: Sun Apr 17, 2016 4:00 am

Re: Securing SD card Image by encrypting in raspberry pi 3

Sat Apr 22, 2017 2:26 am

You cannot encrypt the Ext4 partition because the boot code in the FAT partition can not read an encrypted partition. You would have to split the Ext4 partition in two, one for the operating system and one for your encrypted data.

Big computers have encryption at the disk level because they have megabytes of BIOS running before booting the operating system. To do that, you need a big processor with a noisy fan or a dedicated encryption chip. $$$$

pnaven03
Posts: 139
Joined: Thu Feb 16, 2017 5:21 pm

Re: Securing SD card Image by encrypting in raspberry pi 3

Sat Apr 22, 2017 10:03 am

Thanks for the reply,

What is the best method to provide security to my device,am disabling ssh,root access etc , but i need sdcard security also,
in sdcard loads my application code, if any other persons open sdcard he will not understand my code.
This is my costumer requirement , please any one help me on this.

Regards,
Nv

User avatar
DougieLawson
Posts: 36327
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Securing SD card Image by encrypting in raspberry pi 3

Sat Apr 22, 2017 10:49 am

pnaven03 wrote:... but i need sdcard security also, in sdcard loads my application code, if any other persons open sdcard he will not understand my code. This is my costumer requirement , please any one help me on this.
It's not possible.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
gordon@drogon.net
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Securing SD card Image by encrypting in raspberry pi 3

Mon Apr 24, 2017 5:31 pm

pnaven03 wrote:Thanks for the reply,

What is the best method to provide security to my device,am disabling ssh,root access etc , but i need sdcard security also,
in sdcard loads my application code, if any other persons open sdcard he will not understand my code.
This is my costumer requirement , please any one help me on this.

Regards,
Nv
You could re-partition the SD card and create a new empty, encrypted partition. Then you put all your applications and data in this partition with the rest of the usual/generic Raspbian in the first partition, as normal. You can also encrypt the whole / partition (but not the /boot partition). You can even do this on an already setup Pi.

Downsides -
(a) You/Someone will need to provide the password at boot time every time the Pi is booted. Unattended reboots will not be possible. This may or may not be acceptable to you or your client.
(b) It will be slower than it already is.
(c) google it - the first 2 links I got told me all I needed to know.
(d) You have not thought of this yourself. If I were your client, you'd be sacked by now.

First link on google: https://github.com/NicoHood/NicoHood.gi ... n-Tutorial

-Gordon
--
Gordons projects: https://projects.drogon.net/

pnaven03
Posts: 139
Joined: Thu Feb 16, 2017 5:21 pm

Re: Securing SD card Image by encrypting in raspberry pi 3

Tue Apr 25, 2017 9:09 am

Gordon,

Thanks for the reply,

client will not accept to enter the password.
if any other methods please provide me link.

Regards,
Nv

User avatar
RaTTuS
Posts: 10493
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Securing SD card Image by encrypting in raspberry pi 3

Tue Apr 25, 2017 9:25 am

other ideas - all are defeatable
hot glue the sdcard into place
make tamper proof case
make the code work via a internet connection and only allow from authorized hosts
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
gordon@drogon.net
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Securing SD card Image by encrypting in raspberry pi 3

Tue Apr 25, 2017 12:52 pm

pnaven03 wrote:Gordon,

Thanks for the reply,

client will not accept to enter the password.
if any other methods please provide me link.

Regards,
Nv
Better still, we could bypass the middle-man and give your client my email address and I'll collect the fee...

-Gordon
--
Gordons projects: https://projects.drogon.net/

User avatar
RaTTuS
Posts: 10493
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Securing SD card Image by encrypting in raspberry pi 3

Fri Jul 07, 2017 1:44 pm

How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

haggy
Posts: 5
Joined: Sat Nov 05, 2016 9:23 pm

Re: Securing SD card Image by encrypting in raspberry pi 3

Fri May 18, 2018 6:11 pm

This looks really promising actually! Im also looking for an EFS solution for the RPi so I'll definitely be keeping up with zymbit.

le_
Posts: 1
Joined: Mon Oct 14, 2019 6:50 am

Re: Securing SD card Image by encrypting in raspberry pi 3

Mon Oct 14, 2019 7:01 am

Is it possible to use chroot with encryption?
Instead of encrypting the entire disk, it might be possible to encrypt a single partition. The raspbian system would boot normally, and then you could mount and load the chroot from the encrypted partition...
And anything that requires encryption protection could be transferred to chroot.

Return to “General programming discussion”