Showing posts with label RSA. Show all posts
Showing posts with label RSA. Show all posts

Thursday, August 20, 2015

How to write a zero knowledge server for encryption?

In our project for encryption we needed to make server as blind as possible.

We applied below algorithms for this purpose.

1) Server must not know which files it is storing.
Put files in parts.
Place them at random locations on server.
Put fake blocks.

2)Server file parts must be meaningless.
For attacking for basic files(raw text files) one can check occurring patterns for frequency analysis.
So zip files to decrease entropy.

3)While checking database attackers must not understand anything.
For example think you have a column as user id.

If attacker sees column id = 3 he will understand all files of user 3.
So every column must be kept encrypted.
But a hash or md5 of 3 will always be same .Ex : 344jkfjkdf994jjfjf
So an attacker can understand these files belong to same user.

So what is a good candidate for every row to have different values for same data?
Row id . Put row id into hashing or AES algorithm .

But still there is a pattern.
User Id + Row id
either post or prefix can give a clue.

So put time stamp at beginning.

Date.now + user id + row id

Every user must understand his files but not other people' files.
So AES this with user AES key


select CAST( AES_DECRYPT( UNHEX( enc_column), ? ) as char ) as user_info

FROM anytable_encyrpted HAVING user_info = concat( 'userid=(', ?, '),id=(', anytable_encyrpted_id , ')' ) " ;

? are parameters as follows :
User AES key, and user id

Wednesday, August 19, 2015

How to simulate a thumb driver in local


In a project we needed to simulate a thumb driver for multi user system ,
share public keys over network.


A thumb driver does not share it's private key.
We can simulate a thumb driver in our local.


Project will enable users of system to use their local laptops or
usb drives as thumb drive.

So let's write basic principles for this simulation.
1)All encryption decryption must occur at local machine.

2)All data send over network must be encrypted

3)User public keys must be kept at server.(Public key distribution server better to
be on a different server than data server)

4)RSA is slow for file encryption.Encrypt Files with AES.
Encrypt AES keys with every user's public key put to server.
***You have one door,one key.
for n users clone key and put in a box only that target user have key(user's private key)

Wednesday, August 12, 2015

Sharing Files Over Net wih Encryption ( RSA + AES )


We build a a tool for  "Sharing files over internet with encryption".

Here are simple principles that builds a secure system.
 



Program implements Something u know ,something u have pattern.
Something u know : Your pin, unless u do not share it with anybody
None of your previous data can be obtained by an intruder.

Something u have : Thumb, disk, usb,or mobile




Program never places an un-encrypted data to network or server.
So every encryption and decryption only occur on local environment.



Program stores files as chunks so a server intruder does now obtain full file. Files are stored at chunks.
Files are divided into blocks according to file size. Each block have different AES keys so decrypting a file needs multiple AES hacking.

Server does not hold enough  data for decrypting files. Files decrypts need RSA keys which are only found on Local ends.