[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [KSecretService] f6c5a29: Even more clarification. Remove some TODOs
From:       Michael Leupold <lemma () confuego ! org>
Date:       2010-11-09 19:14:30
Message-ID: 20101109191430.01A81A60EF () git ! kde ! org
[Download RAW message or body]

commit f6c5a29f7770b038197965f46583191d3d55342c
branch master
Author: Michael Leupold <lemma@confuego.org>
Date:   Sun Sep 26 15:27:19 2010 +0000

    Even more clarification. Remove some TODOs which are already done and add an \
integrity check for encrypted parts.  
    svn path=/trunk/playground/base/ksecretservice/; revision=1179938

diff --git a/backend/ksecret/FORMAT b/backend/ksecret/FORMAT
index f66b148..76eb902 100644
--- a/backend/ksecret/FORMAT
+++ b/backend/ksecret/FORMAT
@@ -1,6 +1,6 @@
 This document describes the ksecret format for storing ksecretservice items and \
collection.  
-The ksecret format is a binary format. TODO
+The ksecret format is a binary format.
 
 
 Basic types
@@ -41,8 +41,7 @@ When adding new features that make it impossible for an older \
version of ksecret  to interpret the file's contents, version-major has to be \
increased. Like this  forward- and backward-compatibility among the same major \
version can be sustained.  
-
-header             = magic version algorithms coll-props part-table
+header             = magic version algorithms part-table
 
 magic              = "KSECRET\n\r\0\r\n"              ;; Magic to identify the file \
format  
@@ -79,7 +78,6 @@ a part containing the encrypted, symmetric keys as well as parts \
for the actual  data. Parts can be identified using the part-table. Each part's \
semantics is defined by  its type.
 
-
 part               = part-item-hashes / part-symkey / encrypted-part / mac-part
 
 
@@ -107,7 +105,6 @@ searched even without being decrypted. An attribute hash \
(hash-attrib) is derive  concatenating the property key with the property value and \
creating this string's hash using  algo-hash.
 
-
 part-item-hashes   = num-items *item-hash
 
    num-items       = UINT                             ;; number of items inside this \
part @@ -116,7 +113,7 @@ item-hash          = item-id num-attribs *hash-attrib
 
    item-id         = STRING                           ;; unique item identifier
 
-   num-attribs     = UINT                             ;; number of attributes this \
item hash +   num-attribs     = UINT                             ;; number of \
attributes of this item hash  
    hash-attrib     = BYTEARRAY                        ;; attribute hash
 
@@ -132,21 +129,15 @@ fingerprint). As several methods to encrypt the master key \
exist, it could get s  a ksecret file several times. The application is responsible \
for making sure only valid  encrypted keys are contained withing the ksecret file.
 
-enc-symkey should also contain a method to verify if the master key was derived \
                successfully,
-eg. a hash of the key.
-
-// TODO: add a method to figure out if decrypting a key worked (ie. add
-//       a hash of the key after enc-symkey.
-
-part-symkey        = key-type enc-symkey
+part-symkey        = key-type init-vector enc-symkey
 
    key-type        = UINT                             ;; method for encrypting the \
key  
-   enc-symkey      = BYTEARRAY                        ;; the encrypted symmetric \
                master key
-   
    init-vector     = BYTEARRAY                        ;; initialization vector used \
or empty  ;; if unneeded
 
+   enc-symkey      = BYTEARRAY                        ;; the encrypted symmetric \
master key +
 
 Encrypted parts
 ===============
@@ -158,9 +149,10 @@ contains a hash of the decrypted data to validate with. The \
algorithm used to cr  algo-hash.
 
 Contrary to the other representation, ENCRYPT{} is meant to be the result of the \
                encryption
-function stored as a BYTEARRAY.
+function stored as a BYTEARRAY. HASH{} is the result of the hash function stored as \
a BYTEARRAY. +It's used to verify that decrypting the data was successful.
 
-encrypted-part     = init-vector ENCRYPT{ part-to-encrypt }
+encrypted-part     = init-vector ENCRYPT{ part-to-encrypt HASH{ part-to-encrypt } }
 
    init-vector     = BYTEARRAY                        ;; initialization-vector used \
for encryption  
@@ -207,7 +199,6 @@ Collection-specific configuration values are stored directly \
inside the ksecret  this security-related configuration changes can be protected from \
being changed without  authentication.
 
-
 part-config        = num-cfg-values *config-item
 
    num-cfg-values  = UINT                             ;; number of config-values \
stored @@ -222,6 +213,8 @@ part-config        = num-cfg-values *config-item
 ACLs
 ====
 
+TODO
+
 acls               = num-acls *acl-item               ;; acl part
 
    num-acls        = UINT                             ;; number of entries in the \
acl @@ -259,13 +252,4 @@ attrib             = attrib-key attrib-value
    attrib-value    = STRING                           ;; attribute value
 
 
-ACLs
-====
-
-ACLs are stored verbatim and authenticated so they can only be modified while the \
                configuration is
-unlocked.
-
-TODO
-
-
 Michael Leupold <lemma@confuego.org>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic