3

I currently develop a small system consisting of an embedded server (including a small display) and some mobile devices (at the moment just Android phones).

These mobile devices should be able to talk to the embedded server over a secure channel. For this purpose, the server generates a self-signed SSL certificate during the very first boot process.

If a new mobile device should be connected to the server, the server displays a QR code consisting of:

  • Server IP
  • SSL certificate fingerprint
  • Random device ID

The user scans this QR code using his mobile device. The mobile device connects to the server and checks whether the SSL certificate fingerprint matches the one scanned before.

Is this considered secure? If not, how would you solve this problem?

An alternative approach:

On the very-first boot, the server generates a certificate request and sends it to a central CA server which signs the certificate. The client devices has installed the CA certficate and verifies the server certificate against it.

However, everyone could send a certificate request to the CA server and would get a signed certificate. (One could propably implement some authentication for the CA server using a "master key" but once that is extracted from a system image, the whole authentication becomes useless). In addition this setup requires a central server which I like to avoid since the product may be used in a "offline" environment.

4

1 回答 1

1

是的,这被认为是安全的,因为服务器证书的指纹通过受信任的机制传输到客户端(物理上靠近服务器以通过难以篡改的传输机制接收指纹)。如果在初始设置后尝试 MITM 攻击,即使服务器名称相同,也会生成不同的密钥,因此指纹会不同,客户端会检测到这一点并适当地拒绝通信。

也可以说这种方法更安全,因为客户端不需要信任第 3 方来验证证书的真实性。CA 偶尔会颁发欺诈性证书

于 2013-08-01T14:08:54.050 回答