The following datagrams (from 2 to N) are the encrypted files. It contains encrypted text entries specified by the user. The second datagram `datagram 1` is the *properties*. The *header*'s data is stored in JSON format and can be seen by opening the safe file with a basic text editor. The *header* contains text entries specified by the user and various additional entries incuding a protocol explanation, the type of encoding and the IV of the encryption. The first datagram `datagram 0` is the *header* and is **the only datagram not encrypted**. Public final static String PROTOCOL_SPEC = "JSafebox is using a very simple protocol so encrypted files can be easily read by another program, as long as you have the encryption password.Each datagram is preceded by its length stored as a 64 bits (8 bytes) integer (`long` in Java): length 0|datagram 0|length 1|datagram 1|length 3|.|datagram N. Public final static String PROTOCOL_SPEC_LABEL = "protocol description" Public final static String KEY_ALGO_LABEL = "algo" Public final static String ENCRYPTION_IV_LABEL = "iv" Public final static String ENCRYPTION_LABEL = "encryption" Public final static Type BYTE_ARRAY_TYPE = new TypeToken() Private final static Type MAP_STRING_STRING_TYPE = new TypeToken>() Public final static Gson GSON = new Gson() Public final static String UTF8 = "UTF-8" * License for the specific language governing permissions and limitations under the License. * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * Copyright 2018 Ortis Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. The majority of sensitive operations are located in the following classes: The project is highly focused on security and I would appreciate any feedback that would help improve the quality of the code. The goal is to provide a secured environment where the user can browse encrypted files without leaking data on the drive. I am developing JSafebox, a portable safebox project written in Java.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |