I need to store sensitive data on Raspberry so that software running on Raspberry can use it, but nobody else cannot. I can set hard password, disable tty's and so on, but it's easy to remove SD card and examine in on a PC.

我需要在Raspberry上存储敏感数据,以便在Raspberry上运行的软件可以使用它,但没有其他人不能。我可以设置硬密码,禁用tty等,但是很容易删除SD卡并在PC上查看。

My first try is eCryptFS. It seems to be good, but there is a problem. How do I store passphrase and use it to mount encrypted fs? eCryptFS can read passphrase from file or take it as mount argument. Obviously, I cannot use file as it's stored insecurely. Also I can write a program which will feed a hard-coded (and obfuscated) passphrase to mount.ecryptfs either as cli parameter or from stdin. But in this case it's also possible to run this program and see whole command line with passphrase in a process list.

我的第一次尝试是eCryptFS。这似乎很好,但有一个问题。如何存储密码并使用它来挂载加密的fs? eCryptFS可以从文件中读取密码或将其作为mount参数。显然,我不能使用文件,因为它存储不安全。此外,我可以编写一个程序,它将硬编码(和混淆)密码短语作为cli参数或stdin从mount.ecryptfs提供。但在这种情况下,也可以运行此程序,并在进程列表中查看带有密码的整个命令行。

Now I'm considering hard-coding my passphrase in ecryptfs itself (or even read it from protected eeprom) so it will work only on my device. Or I can use another encryption systems, but all of them have to take a key form somewhere. So the only way do do this as I see is eeprom or hard-coding.

现在我正在考虑在ecryptfs中对我的密码进行硬编码(甚至从受保护的eeprom中读取它),这样它才能在我的设备上运行。或者我可以使用其他加密系统,但所有加密系统都必须在某个地方采用密钥形式。因此,我所看到的唯一方法就是eeprom或硬编码。

Are there better ways to store sensitive data securely on Raspberry's SD card?

有没有更好的方法将敏感数据安全地存储在Raspberry的SD卡上?

2 个解决方案

#1


5

You could use the RaspberryPi unique Serial Number.

您可以使用RaspberryPi唯一的序列号。

You can retrieve it from /proc/cpuinfo

您可以从/ proc / cpuinfo中检索它

~# cat /proc/cpuinfo 
[...]
Hardware    : BCM2709
Revision    : a01041
Serial      : 00000000407xxxxx

Direct bash command:

直接bash命令:

~# ID=$(cat /proc/cpuinfo | grep ^Serial | cut -d":" -f2)
~# echo $ID
00000000407xxxxx

If you need to periodically change the encryption password, use the Rpi serial number as a decryption key for a static file that returns the ecryptfs encryption password. OpenSSL is your friend :D

如果需要定期更改加密密码,请使用Rpi序列号作为返回ecryptfs加密密码的静态文件的解密密钥。 OpenSSL是你的朋友:D

Hope it helps.

希望能帮助到你。

更多相关文章

  1. Shell脚本创建linux用户帐户但密码出错
  2. linux忘记root密码的两种修改方法
  3. ubuntu下的Samba配置:使每个用户可以用自己的用户名和密码登录自
  4. 在centos中安装了mysql5.7之后解决不知道随机的密码的问题
  5. ubuntu修改根用户密码
  6. 解决useradd 用户后没有添加用户Home目录的情况,Linux改变文件或
  7. mysql数据库忘记ROOT密码时的解决办法
  8. mysql5.6和5.7的权限密码设置
  9. Mysql5.7.10版本安装后空密码登录,退出后提示密码错误连接不上解

随机推荐

  1. Android(安卓)studio 通过以servlet搭建
  2. Android多语言布局layout
  3. Google Android手机操作系统发展历程[信
  4. Android相对布局属性
  5. flutter 与 android 混合开发 以及 Andro
  6. 从0到1实现一个Android路由(4)——多模块
  7. 横竖屏切换 android:screenOrientation属
  8. Android开发随想:iPhone和Android之间的对
  9. android高仿小视频、应用锁、3种存储库、
  10. 如何使android应用程序使用当前的主题样