add doc directory for doxygen
authorDong Sun Lee <ds73.lee@samsung.com>
Fri, 18 Jul 2014 00:28:17 +0000 (09:28 +0900)
committerBartlomiej Grzelewski <b.grzelewski@samsung.com>
Fri, 12 Sep 2014 12:58:58 +0000 (14:58 +0200)
Change-Id: I51403514aa64297379fbb076a3ef4a854f395531
Signed-off-by: Dong Sun Lee <ds73.lee@samsung.com>
doc/capi_key_manager_overview_diagram.png [new file with mode: 0644]
doc/key-manager_doc.h [new file with mode: 0644]
src/include/ckmc/ckmc-control.h
src/include/ckmc/ckmc-manager.h
src/include/ckmc/ckmc-type.h

diff --git a/doc/capi_key_manager_overview_diagram.png b/doc/capi_key_manager_overview_diagram.png
new file mode 100644 (file)
index 0000000..480cc63
Binary files /dev/null and b/doc/capi_key_manager_overview_diagram.png differ
diff --git a/doc/key-manager_doc.h b/doc/key-manager_doc.h
new file mode 100644 (file)
index 0000000..23db70d
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef __TIZEN_CORE_KEY_MANAGER_DOC_H__
+#define __TIZEN_CORE_KEY_MANAGER_DOC_H__
+/**
+ * @ingroup CAPI_SECURITY_FRAMEWORK
+ * @defgroup CAPI_KEY_MANAGER_MODULE Key Manager
+ * @brief    The key manager provides a secure repository protected by a user’s passwords for keys, certificates, and sensitive data of users and/or their APPs. Additionally, the key manager provides secure cryptographic operations for non-exportable keys without revealing key values to clients.
+ *
+ * @section CAPI_KEY_MANAGER_MODULE_HEADER Required Header
+ * \#include <ckmc/ckmc_control.h>
+ * \#include <ckmc/ckmc_manager.h>
+ * \#include <ckmc/ckmc_type.h>
+ * \#include <ckmc/ckmc_error.h>
+ *
+ * @section CAPI_KEY_MANAGER_MODULE_OVERVIEW Overview
+ * It provides a secure repository for keys, certificates, and sensitive data of users and/or their APPs which are protected by a user’s passwords.
+ * Additionally, it provides secure cryptographic operations for non-exportable keys without revealing key values to clients.
+ *
+ * @image html capi_key_manager_overview_diagram.png
+ *
+ * The key manager provides three types of API.
+ * - secure repository APIs : These APIs provides storing, retrieving, and removing functions for keys, certificates, and data.
+ * - secure crypto APIs : These APIs provides additional cryptographic operations(create asymmetric key pair, sign/verify signature, verify certificate)
+ * - key manager control APIs : These APIs controls the key manager state(Unlocked/Locked) and reflects the user's password change.
+ *
+ * Data Store Policy
+ *   A client can specify a simple access rules when storing a data in Key Manager.
+ *   - Restricted/Non-Restricted:
+ *     Data stored in Key Manager can be access on only by its owner if the data is tagged as restricted.
+ *     For data tagged as non-restricted, all clients can access on the data.
+ *   - Exportable/Non-Exportable:
+ *     Only for data tagged as exportable, Key Manager returns the raw value of the data.
+ *     If data is tagged as non-exportable, Key Manager doesn’t return its raw value. For that case, Key Manager provides secure cryptographic operations for non-exportable keys without revealing key values to clients.
+ *   - Per Key Password:
+ *     All data in Key Manager is protected by a user’s password.
+ *     Besides, a client can encrypt its data using its own password additionally.
+ *     If a client provides a password when storing a data, the data will be encrypted with the password. This password should be provided when get the data from Key Manager.
+
+ * User Login and control API
+ *   - When a user logs in, logs out, and changes his/her password, the key manager should be notified.
+ *   - Only privileged APPs such as LockScreen APP or Setting APP can notify to key manager using the control APIs.
+ *   - When a user logs in, the key manager decrypts the user's DKEK with a user password.
+ *     So during the loggin period, any client can access its data which is protected by a user's password(technically encrypted with the client's ADEK).
+ *   - When a user logs out, the key manager removes the user's DKEK from memory.
+ *     Therefore, any clients cannot access to any data.
+ *   - When a user change his/her password, the key manager re-encrypted the user's DKEK with a new password.
+ */
+
+#endif /* __TIZEN_CORE_KEY_MANAGER_DOC_H__ */
index 0cfd66e..5dc2ab3 100644 (file)
@@ -33,6 +33,7 @@ extern "C" {
 #endif
 
 /**
+ * @internal // control APIs are platform level APIs.
  * @addtogroup CAPI_KEY_MANAGER_MODULE
  * @{
  */
@@ -147,7 +148,7 @@ int ckmc_change_user_password(uid_t user, const char *old_password, const char *
  * @privlevel platform
  * @privilege %http://tizen.org/privilege/keymanager.admin *
  */
-int ckmc_reset_user_password(uid_t user, const char *newPassword);
+int ckmc_reset_user_password(uid_t user, const char *new_password);
 
 
 /**
index 3b71be9..97bc31a 100644 (file)
@@ -41,7 +41,7 @@ extern "C" {
  * @brief Stores a key inside key manager based on the provided policy.
  *
  * @remarks Currently only four types of keys are supported for this API. These are RSA public/private key and ECDSA /private key.
- * @remarks key_type in key may be set to #CKM_KEY_NONE as an input. key_type is determined inside key manager during storing keys.
+ * @remarks key_type in key may be set to #CKMC_KEY_NONE as an input. key_type is determined inside key manager during storing keys.
  * @remarks Some private key files are protected by a password. if raw_key in key read from those encrypted files is encrypted with a password, the password should be provided in the #ckmc_key structure.
  * @remarks if password in policy is provided, the key is additionally encrypted with the password in policy.
  *
index 060bdbd..a52e273 100644 (file)
@@ -253,7 +253,7 @@ ckmc_cert *ckmc_cert_new(unsigned char *raw_cert, size_t cert_size, ckmc_data_fo
 
 /**
  * @brief Destroys the ckmc_cert handle and releases all its resources.
- * @param[in] buffer a ckmc_cert handle to destroy
+ * @param[in] cert a ckmc_cert handle to destroy
  * @see ckmc_cert_new()
  * @see ckmc_load_cert_from_file()
  * @see ckmc_load_from_pkcs12_file
@@ -361,7 +361,7 @@ ckmc_alias_list *ckmc_alias_list_add(ckmc_alias_list *previous, char *alias);
  *
  * @remarks It does not destroy an alias itself in ckmc_alias_list.
  *
- * @param[in] buffer the first ckmc_alias_list handle to destroy
+ * @param[in] first the first ckmc_alias_list handle to destroy
  * @see ckmc_alias_list_new()
  * @see ckmc_alias_list_add()
  * @see ckmc_alias_list_all_free()
@@ -378,7 +378,7 @@ void ckmc_alias_list_free(ckmc_alias_list *first);
  *
  * @remarks It also destroy an alias in ckmc_alias_list.
  *
- * @param[in] buffer the first ckmc_alias_list handle to destroy
+ * @param[in] first the first ckmc_alias_list handle to destroy
  * @see ckmc_alias_list_new()
  * @see ckmc_alias_list_add()
  * @see ckmc_alias_list_free()
@@ -388,7 +388,7 @@ void ckmc_alias_list_free(ckmc_alias_list *first);
  * @privlevel public
  * @privilege %http://tizen.org/privilege/keymanager *
  */
-void ckmc_alias_list_all_free(ckmc_alias_list *cert_list);
+void ckmc_alias_list_all_free(ckmc_alias_list *first);
 
 
 
@@ -437,7 +437,7 @@ ckmc_cert_list *ckmc_cert_list_add(ckmc_cert_list *previous, ckmc_cert *cert);
  *
  * @remarks It does not destroy an ckmc_cert itself in ckmc_cert_list.
  *
- * @param[in] buffer the first ckmc_cert_list handle to destroy
+ * @param[in] first the first ckmc_cert_list handle to destroy
  * @see ckmc_cert_list_new()
  * @see ckmc_cert_list_add()
  * @see ckmc_cert_list_all_free()
@@ -454,7 +454,7 @@ void ckmc_cert_list_free(ckmc_cert_list *first);
  *
  * @remarks It also destroy an ckmc_cert in ckmc_cert_list.
  *
- * @param[in] buffer the first ckmc_cert_list handle to destroy
+ * @param[in] first the first ckmc_cert_list handle to destroy
  * @see ckmc_cert_list_new()
  * @see ckmc_cert_list_add()
  * @see ckmc_cert_list_free()
@@ -464,7 +464,7 @@ void ckmc_cert_list_free(ckmc_cert_list *first);
  * @privlevel public
  * @privilege %http://tizen.org/privilege/keymanager *
  */
-void ckmc_cert_list_all_free(ckmc_cert_list *cert_list);
+void ckmc_cert_list_all_free(ckmc_cert_list *first);
 
 
 /**