coniks-sys / coniks-go

A CONIKS implementation in Golang
http://coniks.org
Other
116 stars 30 forks source link

Client send salt along with the registration #180

Open vqhuy opened 6 years ago

vqhuy commented 6 years ago

During our last meeting, we discussed how should the server/the client compute the commitment:

chesnokovilya commented 6 years ago

Is crypto/Rand library [https://golang.org/pkg/crypto/rand/] secure enough for salt implementation?

masomel commented 6 years ago

We currently use Go's crypto/rand package for salt generation (see https://github.com/coniks-sys/coniks-go/blob/master/crypto/util.go#L61), so it should be fine to continue using crypto/rand to generate a salt on the client side.

chesnokovilya commented 6 years ago

Where should client store salt?

vqhuy commented 6 years ago

Sorry for the late response. As you mentioned in your email, we could store the salt (and other things) in a json-encoded file. OTOH, as we discussed in https://github.com/coniks-sys/coniks-go/pull/193#discussion_r150115421, we'll eventually do some sort of abstract API for persistent storage.

chesnokovilya commented 6 years ago

Fine, so It will goes like this (in simple terms): When client register he creates salt and save it on hard drive and send it to server. Server take salt and calculate commitment with it and key:value. When client audit the system he reads salt from the disk and check server commitment and STR of merkle tree.

It means there are required changes to client, protocol, server, pam, merkletree, and util folders.