Jump to: navigation, search

Difference between revisions of "Mihini/Security"

(Usefull commands)
(Usefull commands)
Line 42: Line 42:
  
 
To remove the password :
 
To remove the password :
Keys are stored in :   /readyagent/build.default/runtime/crypto
+
* Keys are stored in: /readyagent/build.default/runtime/crypto
Remove the file : crypto.key
+
* Remove the file: crypto.key
  
 
Create a connection:
 
Create a connection:

Revision as of 09:39, 5 April 2013

How to activate security with M3DA protocol?

Firstly, you need to compile a module which is not compiled by default. After you build.sh, you must do this command:

$ make all agent_provisioning

Note: Here the following list you can define for encryption and authentication:

* AUTHENTICATION_TYPE = hmac-md5    or  hmac-sha1   or none  (if you select none for authentication, you must select none for encryption)
* ENCRYPTION_TYPE     = aes-cbc-128   or    aes-cbc-256   or   aes-ctr-128   or   aes-ctr-256   or   none

1. Choose the authentication algorithm :

agent.config.server.authentication ='hmac-sha1'

2. Choose the encryption algorithm :

agent.config.server.encryption ='aes-cbc-128'

3. Generate the keys by using Registration password (shareKey) (=> Compute and store the keys)

require 'agent.provisioning'.registration_password 'xxxx'       (needs "make all agent_provisioning" to be executed before)

Usefull commands

If you want to remove the authentication:

agent.config.server.authentication = nil

To remove the encryption:

agent.config.server.encryption = nil

To change the password :

require 'agent.provisioning'.password ='xxxx'                   (needs "make all agent_provisioning" to be executed before)

To remove the password :

* Keys are stored in: /readyagent/build.default/runtime/crypto
* Remove the file: crypto.key

Create a connection:

airvantage=require "airvantage"
airvantage.connecttoserver()