Update UML files for class and sequence diagrams 90/117190/2
authorSungjun, Lee <sjun221.lee@samsung.com>
Fri, 3 Mar 2017 07:01:18 +0000 (16:01 +0900)
committerSungjun, Lee <sjun221.lee@samsung.com>
Fri, 3 Mar 2017 09:05:11 +0000 (18:05 +0900)
Change-Id: Ic7ad6e6cd95a9fa791e15bea437730f41e537f22
Signed-off-by: Sungjun, Lee <sjun221.lee@samsung.com>
doc/diagram/class/ExternalEncryption.uml [new file with mode: 0644]
doc/diagram/class/InternalEncryption.uml [new file with mode: 0644]
doc/diagram/class/SecureErase.uml [new file with mode: 0644]
doc/diagram/sequence/ode-external-decrypt.uml
doc/diagram/sequence/ode-external-encrypt.uml
doc/diagram/sequence/ode-internal-decrypt-dmcrypt.uml
doc/diagram/sequence/ode-internal-decrypt-ext4.uml
doc/diagram/sequence/ode-internal-encrypt-dmcrypt.uml
doc/diagram/sequence/ode-internal-encrypt-ext4.uml
doc/diagram/sequence/ode-secure-clean.uml
doc/diagram/sequence/ode-secure-erase.uml

diff --git a/doc/diagram/class/ExternalEncryption.uml b/doc/diagram/class/ExternalEncryption.uml
new file mode 100644 (file)
index 0000000..7d6428c
--- /dev/null
@@ -0,0 +1,70 @@
+@startuml
+
+namespace ode {
+
+class AppBundle {
+void addInternal(const std::string& key, const std::string& value)
+}
+class Launchpad {
+void launch(const std::string& appid, const AppBundle& bundle)
+}
+
+Launchpad "1" ..> "1" AppBundle
+
+class ExternalEncryption {
+int encrypt(const std::string &password,unsigned int options)
+int decrypt(const std::string &password)
+}
+
+ExternalEncryption "1" ..> "1" EcryptfsEngine
+ExternalEncryption "1" ..> "1" AppBundle
+ExternalEncryption "1" ..> "1" Launchpad
+ExternalEncryption "1" ..> "1" KeyManager
+
+class EcryptfsEngine {
+void mount(const data &key, unsigned int options)
+void umount()
+void encrypt(const data &key, unsigned int options)
+void decrypt(const data &key, unsigned int options)
+}
+class ProgressBar {
+void update(int value)
+void done()
+}
+class FileFooter {
+const FileFooter::data read(const std::string &key)
+}
+class KernelKeyRing {
+int32_t add(const std::string& type, const std::string& description, const void* payload, size_t plen, int32_t ringid)
+long search(int32_t ringid, const std::string& type, const std::string& description, int32_t destringid)
+}
+
+EcryptfsEngine "1" *--> "1" ProgressBar
+EcryptfsEngine "1" ..> "1" KeyManager
+EcryptfsEngine "1" ..> "1" FileFooter
+EcryptfsEngine "1" ..> "1" KernelKeyRing
+FileFooter "1" ..> "1" KeyGenerator
+
+class AntiForensics {
+AntiForensics::data AFSplit(const AntiForensics::data &src, uint32_t blockSize, uint32_t blockNumbers)
+AntiForensics::data AFMerge(const AntiForensics::data &src, uint32_t blockSize, uint32_t blockNumbers)
+}
+class KeyManager {
+bool verifyPassword(const data& password)
+const data getMasterKey(const data& password)
+}
+class KeyStore {
+const data getPasswordSalt()
+const data getMasterKeyDigest()
+}
+class KeyGenerator {
+static const data PBKDF(const data& pass, const data& salt, size_t iteration, size_t resultSize)
+static const data RNG(size_t resultSize)
+}
+KeyManager "1" *--> "1" KeyStore
+KeyManager "1" ..> "1" AntiForensics
+KeyManager "1" ..> "1" KeyGenerator
+
+}
+
+@enduml
diff --git a/doc/diagram/class/InternalEncryption.uml b/doc/diagram/class/InternalEncryption.uml
new file mode 100644 (file)
index 0000000..e827287
--- /dev/null
@@ -0,0 +1,75 @@
+@startuml
+
+namespace ode {
+
+class InternalEncryption {
+int encrypt(const std::string& password, unsigned int options)
+int decrypt(const std::string& password)
+}
+
+InternalEncryption "1" ..> "1" DMCryptEngine
+InternalEncryption "1" ..> "1" Ext4Engine
+InternalEncryption "1" ..> "1" KeyManager
+
+class CryptInfo {
+long getFileSystemSize()
+std::string getCryptoTypeName()
+}
+class DMCryptEngine  {
+void mount(const data &key, unsigned int options)
+void umount()
+void encrypt(const data &key, unsigned int options)
+void decrypt(const data &key, unsigned int options)
+}
+class Ext4Engine {
+void mount(const data &key, unsigned int options)
+void umount()
+void encrypt(const data &key, unsigned int options)
+void decrypt(const data &key, unsigned int options)
+}
+class Ext4Tool {
+unsigned int getBlockSize()
+unsigned int getTotalBlockCount()
+}
+class ProgressBar {
+void update(int value)
+void done()
+}
+class FileFooter {
+const FileFooter::data read(const std::string &key)
+}
+
+DMCryptEngine "1" ..> "1" Ext4Tool
+DMCryptEngine "1" *--> "1" ProgressBar
+DMCryptEngine "1" *--> "1" CryptInfo
+DMCryptEngine "1" ..> "1" KeyManager
+DMCryptEngine "1" ..> "1" FileFooter
+Ext4Engine "1" *--> "1" ProgressBar
+Ext4Engine "1" ..> "1" KeyManager
+Ext4Engine "1" ..> "1" FileFooter
+Ext4Engine "1" ..> "1" KeyGenerator
+FileFooter "1" ..> "1" KeyGenerator
+
+class AntiForensics {
+AntiForensics::data AFSplit(const AntiForensics::data &src, uint32_t blockSize, uint32_t blockNumbers)
+AntiForensics::data AFMerge(const AntiForensics::data &src, uint32_t blockSize, uint32_t blockNumbers)
+}
+class KeyManager {
+bool verifyPassword(const data& password)
+const data getMasterKey(const data& password)
+}
+class KeyStore {
+const data getPasswordSalt()
+const data getMasterKeyDigest()
+}
+class KeyGenerator {
+static const data PBKDF(const data& pass, const data& salt, size_t iteration, size_t resultSize)
+static const data RNG(size_t resultSize)
+}
+KeyManager "1" *--> "1" KeyStore
+KeyManager "1" ..> "1" AntiForensics
+KeyManager "1" ..> "1" KeyGenerator
+
+}
+
+@enduml
diff --git a/doc/diagram/class/SecureErase.uml b/doc/diagram/class/SecureErase.uml
new file mode 100644 (file)
index 0000000..2679610
--- /dev/null
@@ -0,0 +1,45 @@
+@startuml
+
+namespace ode {
+
+class Block {
+unsigned long long physicalOffset
+unsigned long long length
+}
+class BlockDevice {
+int discard(const Block &block)
+int secDiscard(const Block &block)
+int getSize()
+}
+
+BlockDevice "1" ..> "1" Block
+
+class SecureErase {
+int erase(const std::string& name)
+int clean(const std::string& name)
+}
+
+SecureErase "1" ..> "1" MMCEraseEngine
+
+class MMCEraseEngine {
+int eraseDevice(const std::string &path)
+int cleanDevice(const std::string &path)
+int eraseFiles(const std::string &path)
+}
+class Ext4Tool {
+unsigned int getBlockSize()
+unsigned int getTotalBlockCount()
+}
+class ProgressBar {
+void update(int value)
+void done()
+}
+
+MMCEraseEngine "1" *--> "1" ProgressBar
+MMCEraseEngine "1" ..> "1" Block
+MMCEraseEngine "1" ..> "1" BlockDevice
+MMCEraseEngine "1" ..> "1" Ext4Tool
+
+}
+
+@enduml
index 594e04b..2b577c3 100644 (file)
@@ -1,37 +1,27 @@
 @startuml
 hide footbox
-actor ODEDaemon
-activate ODEDaemon
 
-ODEDaemon -> Server : construct
-activate Server
+actor Settings
+participant ODEContext
+participant Client
+participant ClientConnection
 
-Server -> Service : construct(/tmp/.ode.sock)
-activate Service
-Service -> Mainloop : construct
+participant Mainloop
+participant Service
+participant ServerConnection
+participant ExternalEncryption
+participant EcryptfsEngine
+participant FileFooter
+participant KeyManager
+participant ProgressBar
 activate Mainloop
-Mainloop -> ServerConnection : construct
+activate Service
 activate ServerConnection
-Server -> ExternalEncryption : construct
 activate ExternalEncryption
-ExternalEncryption -> Service : setMethodHandler
-ExternalEncryption -> EcryptfsEngine : construct
 activate EcryptfsEngine
-
-participant FileFooter
-participant KeyManager
-
-EcryptfsEngine -> ProgressBar : construct
 activate ProgressBar
-ExternalEncryption -> ExternalEncryption : externalAddEventReceiver
-
-participant ClientConnection
-participant Client
-participant ODEContext
-
-actor ODELibrary
 
-ODEContext <- ODELibrary : ode_external_encryption_decrypt
+Settings -> ODEContext : ode_external_encryption_decrypt
 activate ODEContext
 
 ODEContext -> Client : methodCall
@@ -90,7 +80,7 @@ ClientConnection --> Client
 deactivate ClientConnection
 Client --> ODEContext : result
 deactivate Client
-ODEContext --> ODELibrary : result
+ODEContext --> Settings : result
 deactivate ODEContext
 
 @enduml
index 9ea5c7a..192b1f2 100644 (file)
@@ -1,37 +1,27 @@
 @startuml
 hide footbox
-actor ODEDaemon
-activate ODEDaemon
 
-ODEDaemon -> Server : construct
-activate Server
+actor Settings
+participant ODEContext
+participant Client
+participant ClientConnection
 
-Server -> Service : construct(/tmp/.ode.sock)
-activate Service
-Service -> Mainloop : construct
+participant Mainloop
+participant Service
+participant ServerConnection
+participant ExternalEncryption
+participant EcryptfsEngine
+participant FileFooter
+participant KeyManager
+participant ProgressBar
 activate Mainloop
-Mainloop -> ServerConnection : construct
+activate Service
 activate ServerConnection
-Server -> ExternalEncryption : construct
 activate ExternalEncryption
-ExternalEncryption -> Service : setMethodHandler
-ExternalEncryption -> EcryptfsEngine : construct
 activate EcryptfsEngine
-
-participant FileFooter
-participant KeyManager
-
-EcryptfsEngine -> ProgressBar : construct
 activate ProgressBar
-ExternalEncryption -> ExternalEncryption : externalAddEventReceiver
-
-participant ClientConnection
-participant Client
-participant ODEContext
-
-actor ODELibrary
 
-ODEContext <- ODELibrary : ode_external_encryption_encrypt
+Settings -> ODEContext : ode_external_encryption_encrypt
 activate ODEContext
 
 ODEContext -> Client : methodCall
@@ -87,7 +77,7 @@ ClientConnection --> Client
 deactivate ClientConnection
 Client --> ODEContext : result
 deactivate Client
-ODEContext --> ODELibrary : result
+ODEContext --> Settings : result
 deactivate ODEContext
 
 @enduml
index e78443c..c3032e3 100644 (file)
@@ -1,36 +1,27 @@
 @startuml
 hide footbox
-actor ODEDaemon
-activate ODEDaemon
 
-ODEDaemon -> Server : construct
-activate Server
+actor Settings
+participant ODEContext
+participant Client
+participant ClientConnection
 
-Server -> Service : construct(/tmp/.ode.sock)
-activate Service
-Service -> Mainloop : construct
+participant Mainloop
+participant Service
+participant ServerConnection
+participant InternalEncryption
+participant DMCryptEngine
+participant FileFooter
+participant KeyManager
+participant ProgressBar
 activate Mainloop
-Mainloop -> ServerConnection : construct
+activate Service
 activate ServerConnection
-Server -> InternalEncryption : construct
 activate InternalEncryption
-InternalEncryption -> Service : setMethodHandler
-InternalEncryption -> DMCryptEngine : construct
 activate DMCryptEngine
-
-participant FileFooter
-participant KeyManager
-
-DMCryptEngine -> ProgressBar : construct
 activate ProgressBar
 
-participant ClientConnection
-participant Client
-participant ODEContext
-
-actor ODELibrary
-
-ODEContext <- ODELibrary : ode_internal_encryption_decrypt
+Settings -> ODEContext : ode_internal_encryption_decrypt
 activate ODEContext
 
 ODEContext -> Client : methodCall
@@ -91,7 +82,7 @@ ClientConnection --> Client
 deactivate ClientConnection
 Client --> ODEContext : result
 deactivate Client
-ODEContext --> ODELibrary : result
+ODEContext --> Settings : result
 deactivate ODEContext
 
 @enduml
index a92ab83..b3e6740 100644 (file)
@@ -1,36 +1,27 @@
 @startuml
 hide footbox
-actor ODEDaemon
-activate ODEDaemon
 
-ODEDaemon -> Server : construct
-activate Server
+actor Settings
+participant ODEContext
+participant Client
+participant ClientConnection
 
-Server -> Service : construct(/tmp/.ode.sock)
-activate Service
-Service -> Mainloop : construct
+participant Mainloop
+participant Service
+participant ServerConnection
+participant InternalEncryption
+participant Ext4Engine
+participant FileFooter
+participant KeyManager
+participant ProgressBar
 activate Mainloop
-Mainloop -> ServerConnection : construct
+activate Service
 activate ServerConnection
-Server -> InternalEncryption : construct
 activate InternalEncryption
-InternalEncryption -> Service : setMethodHandler
-InternalEncryption -> Ext4Engine : construct
 activate Ext4Engine
-
-participant FileFooter
-participant KeyManager
-
-Ext4Engine -> ProgressBar : construct
 activate ProgressBar
 
-participant ClientConnection
-participant Client
-participant ODEContext
-
-actor ODELibrary
-
-ODEContext <- ODELibrary : ode_internal_encryption_decrypt
+Settings -> ODEContext : ode_internal_encryption_decrypt
 activate ODEContext
 
 ODEContext -> Client : methodCall
@@ -91,7 +82,7 @@ ClientConnection --> Client
 deactivate ClientConnection
 Client --> ODEContext : result
 deactivate Client
-ODEContext --> ODELibrary : result
+ODEContext --> Settings : result
 deactivate ODEContext
 
 @enduml
index 9d8c8b7..160373b 100644 (file)
@@ -1,36 +1,27 @@
 @startuml
 hide footbox
-actor ODEDaemon
-activate ODEDaemon
 
-ODEDaemon -> Server : construct
-activate Server
+actor Settings
+participant ODEContext
+participant Client
+participant ClientConnection
 
-Server -> Service : construct(/tmp/.ode.sock)
-activate Service
-Service -> Mainloop : construct
+participant Mainloop
+participant Service
+participant ServerConnection
+participant InternalEncryption
+participant DMCryptEngine
+participant FileFooter
+participant KeyManager
+participant ProgressBar
 activate Mainloop
-Mainloop -> ServerConnection : construct
+activate Service
 activate ServerConnection
-Server -> InternalEncryption : construct
 activate InternalEncryption
-InternalEncryption -> Service : setMethodHandler
-InternalEncryption -> DMCryptEngine : construct
 activate DMCryptEngine
-
-participant FileFooter
-participant KeyManager
-
-DMCryptEngine -> ProgressBar : construct
 activate ProgressBar
 
-participant ClientConnection
-participant Client
-participant ODEContext
-
-actor ODELibrary
-
-ODEContext <- ODELibrary : ode_internal_encryption_encrypt
+Settings -> ODEContext : ode_internal_encryption_encrypt
 activate ODEContext
 
 ODEContext -> Client : methodCall
@@ -88,7 +79,7 @@ ClientConnection --> Client
 deactivate ClientConnection
 Client --> ODEContext : result
 deactivate Client
-ODEContext --> ODELibrary : result
+ODEContext --> Settings : result
 deactivate ODEContext
 
 @enduml
index 84b5d8e..2f60ef3 100644 (file)
@@ -1,36 +1,27 @@
 @startuml
 hide footbox
-actor ODEDaemon
-activate ODEDaemon
 
-ODEDaemon -> Server : construct
-activate Server
+actor Settings
+participant ODEContext
+participant Client
+participant ClientConnection
 
-Server -> Service : construct(/tmp/.ode.sock)
-activate Service
-Service -> Mainloop : construct
+participant Mainloop
+participant Service
+participant ServerConnection
+participant InternalEncryption
+participant Ext4Engine
+participant FileFooter
+participant KeyManager
+participant ProgressBar
 activate Mainloop
-Mainloop -> ServerConnection : construct
+activate Service
 activate ServerConnection
-Server -> InternalEncryption : construct
 activate InternalEncryption
-InternalEncryption -> Service : setMethodHandler
-InternalEncryption -> Ext4Engine : construct
 activate Ext4Engine
-
-participant FileFooter
-participant KeyManager
-
-Ext4Engine -> ProgressBar : construct
 activate ProgressBar
 
-participant ClientConnection
-participant Client
-participant ODEContext
-
-actor ODELibrary
-
-ODEContext <- ODELibrary : ode_internal_encryption_encrypt
+Settings -> ODEContext : ode_internal_encryption_encrypt
 activate ODEContext
 
 ODEContext -> Client : methodCall
@@ -92,7 +83,7 @@ ClientConnection --> Client
 deactivate ClientConnection
 Client --> ODEContext : result
 deactivate Client
-ODEContext --> ODELibrary : result
+ODEContext --> Settings : result
 deactivate ODEContext
 
 @enduml
index ecb5ffe..a4ee462 100644 (file)
@@ -1,36 +1,27 @@
 @startuml
 hide footbox
-actor ODEDaemon
-activate ODEDaemon
 
-ODEDaemon -> Server : construct
-activate Server
+actor Settings
+participant ODEContext
+participant Client
+participant ClientConnection
 
-Server -> Service : construct(/tmp/.ode.sock)
-activate Service
-Service -> Mainloop : construct
+participant Mainloop
+participant Service
+participant ServerConnection
+participant SecureErase
+participant MMCEraseEngine
+participant Ext4Tool
+participant BlockDevice
+participant ProgressBar
 activate Mainloop
-Mainloop -> ServerConnection : construct
+activate Service
 activate ServerConnection
-Server -> SecureErase : construct
 activate SecureErase
-SecureErase -> Service : setMethodHandler
-SecureErase -> MMCEraseEngine : construct
 activate MMCEraseEngine
-
-participant Ext4Tool
-participant BlockDevice
-
-MMCEraseEngine -> ProgressBar : construct
 activate ProgressBar
 
-participant ClientConnection
-participant Client
-participant ODEContext
-
-actor ODELibrary
-
-ODEContext <- ODELibrary : ode_secure_clean
+Settings -> ODEContext : ode_secure_clean
 activate ODEContext
 
 ODEContext -> Client : methodCall
@@ -82,7 +73,7 @@ ClientConnection --> Client
 deactivate ClientConnection
 Client --> ODEContext : result
 deactivate Client
-ODEContext --> ODELibrary : result
+ODEContext --> Settings : result
 deactivate ODEContext
 
 @enduml
index d52d69c..a7f1e3c 100644 (file)
@@ -1,36 +1,27 @@
 @startuml
 hide footbox
-actor ODEDaemon
-activate ODEDaemon
 
-ODEDaemon -> Server : construct
-activate Server
+actor Settings
+participant ODEContext
+participant Client
+participant ClientConnection
 
-Server -> Service : construct(/tmp/.ode.sock)
-activate Service
-Service -> Mainloop : construct
+participant Mainloop
+participant Service
+participant ServerConnection
+participant SecureErase
+participant MMCEraseEngine
+participant Ext4Tool
+participant BlockDevice
+participant ProgressBar
 activate Mainloop
-Mainloop -> ServerConnection : construct
+activate Service
 activate ServerConnection
-Server -> SecureErase : construct
 activate SecureErase
-SecureErase -> Service : setMethodHandler
-SecureErase -> MMCEraseEngine : construct
 activate MMCEraseEngine
-
-participant Ext4Tool
-participant BlockDevice
-
-MMCEraseEngine -> ProgressBar : construct
 activate ProgressBar
 
-participant ClientConnection
-participant Client
-participant ODEContext
-
-actor ODELibrary
-
-ODEContext <- ODELibrary : ode_secure_erase
+Settings -> ODEContext : ode_secure_erase
 activate ODEContext
 
 ODEContext -> Client : methodCall
@@ -93,7 +84,7 @@ ClientConnection --> Client
 deactivate ClientConnection
 Client --> ODEContext : result
 deactivate Client
-ODEContext --> ODELibrary : result
+ODEContext --> Settings : result
 deactivate ODEContext
 
 @enduml