<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi,<div><br></div><div>followed the same approach in iOS API, e.g:</div><div><br></div><div><pre class="line-pre" style="font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 16px; width: 744px; margin-top: 0px; margin-bottom: 0px; padding: 0px; background-color: rgb(255, 255, 255); position: static; z-index: auto;"><div class="line" id="file-gistfile1-m-LC1"><span class="n" style="color: rgb(51, 51, 51);">AGKeyStoreCryptoConfig</span> <span class="o" style="font-weight: bold;">*</span><span class="n" style="color: rgb(51, 51, 51);">config</span> <span class="o" style="font-weight: bold;">=</span> <span class="p">[[</span><span class="n" style="color: rgb(51, 51, 51);">AGKeyStoreCryptoConfig</span> <span class="n" style="color: rgb(51, 51, 51);">alloc</span><span class="p">]</span> <span class="n" style="color: rgb(51, 51, 51);">init</span><span class="p">];</span></div><div class="line" id="file-gistfile1-m-LC2"><span class="p">[</span><span class="n" style="color: rgb(51, 51, 51);">config</span> <span class="n" style="color: rgb(51, 51, 51);">setAlias</span><span class="o" style="font-weight: bold;">:</span><span class="s" style="color: rgb(221, 17, 68);">@"alias"</span><span class="p">];</span></div><div class="line" id="file-gistfile1-m-LC3"><span class="p">[</span><span class="n" style="color: rgb(51, 51, 51);">config</span> <span class="n" style="color: rgb(51, 51, 51);">setPassword</span><span class="o" style="font-weight: bold;">:</span><span class="s" style="color: rgb(221, 17, 68);">@"passphrase"</span><span class="p">];</span></div><div class="line" id="file-gistfile1-m-LC4">&nbsp;</div><div class="line" id="file-gistfile1-m-LC5"><span class="n" style="color: rgb(51, 51, 51);">AGStoreConfiguration</span><span class="o" style="font-weight: bold;">*</span> <span class="n" style="color: rgb(51, 51, 51);">config</span> <span class="o" style="font-weight: bold;">=</span> <span class="p">[[</span><span class="n" style="color: rgb(51, 51, 51);">AGStoreConfiguration</span> <span class="n" style="color: rgb(51, 51, 51);">alloc</span><span class="p">]</span> <span class="n" style="color: rgb(51, 51, 51);">init</span><span class="p">];</span></div><div class="line" id="file-gistfile1-m-LC6"><span class="p">[</span><span class="n" style="color: rgb(51, 51, 51);">config</span> <span class="n" style="color: rgb(51, 51, 51);">setRecordId</span><span class="o" style="font-weight: bold;">:</span><span class="s" style="color: rgb(221, 17, 68);">@"id"</span><span class="p">];</span></div><div class="line" id="file-gistfile1-m-LC7"><span class="c1" style="color: rgb(153, 153, 136); font-style: italic;">// apply the desired crypto service</span></div><div class="line" id="file-gistfile1-m-LC8"><span class="p">[</span><span class="n" style="color: rgb(51, 51, 51);">config</span> <span class="n" style="color: rgb(51, 51, 51);">setEncryptionService</span><span class="o" style="font-weight: bold;">:</span><span class="n" style="color: rgb(51, 51, 51);">encService</span><span class="p">];</span></div><div class="line" id="file-gistfile1-m-LC9">&nbsp;</div><div class="line" id="file-gistfile1-m-LC10"><span class="n" style="color: rgb(51, 51, 51);">encMemStore</span> <span class="o" style="font-weight: bold;">=</span> <span class="p">[</span><span class="n" style="color: rgb(51, 51, 51);">AGEncryptedMemoryStorage</span> <span class="n" style="color: rgb(51, 51, 51);">storeWithConfig</span><span class="o" style="font-weight: bold;">:</span><span class="n" style="color: rgb(51, 51, 51);">config</span><span class="p">];</span></div></pre><div><br></div><div>The&nbsp;<span style="background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 16px; white-space: pre;">AGEncryptedMemoryStorage </span>will now use the configured EncryptionService to encrypt/decrypt data.</div><div><br></div><div>Implemented EncryptionService is the AGPasswordKeyServices[1] &nbsp;that uses apple keychain to store password and encryption key</div><div><br></div><div>Work branch is here [2]</div><div><br></div><div>-</div><div>Christos</div><div><br></div><div>[1] <a href="https://github.com/cvasilak/aerogear-ios/blob/d04c9627b1dd96b69c92c4a4fefcfbbc7ab3e6c1/AeroGear-iOS/AeroGear-iOS/security/AGPasswordKeyServices.m">https://github.com/cvasilak/aerogear-ios/blob/d04c9627b1dd96b69c92c4a4fefcfbbc7ab3e6c1/AeroGear-iOS/AeroGear-iOS/security/AGPasswordKeyServices.m</a></div><div>[2] <a href="https://github.com/cvasilak/aerogear-ios/commit/d04c9627b1dd96b69c92c4a4fefcfbbc7ab3e6c1">https://github.com/cvasilak/aerogear-ios/commit/d04c9627b1dd96b69c92c4a4fefcfbbc7ab3e6c1</a></div><div><br></div><div><br></div><div><br></div><div><div>On Nov 8, 2013, at 5:38 PM, Summers Pittman &lt;<a href="mailto:supittma@redhat.com">supittma@redhat.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Ok so I updated a little bit:<br><br>So KeyService is now EncryptionService.<br><br><a href="https://github.com/secondsun/aerogear-android/blob/security/src/org/jboss/aerogear/android/security/EncryptionService.java">https://github.com/secondsun/aerogear-android/blob/security/src/org/jboss/aerogear/android/security/EncryptionService.java</a><br><br>Usages are here :<br><br>https://gist.github.com/secondsun/c1fb32a4c49f9bb6bed2<br><br>KeyManager is in Process.<br><br>Here are links to the classes for my impls of EncryptionService<br><br>https://github.com/secondsun/aerogear-android/blob/security/src/org/jboss/aerogear/android/impl/security/AbstractEncryptionService.java<br><br>https://github.com/secondsun/aerogear-android/blob/security/src/org/jboss/aerogear/android/impl/security/PasswordKeyServices.java<br><br>https://github.com/secondsun/aerogear-android/blob/security/src/org/jboss/aerogear/android/impl/security/PassPhraseKeyServices.java<br><br><br>On 11/05/2013 03:00 PM, Summers Pittman wrote:<br><blockquote type="cite">One of the things we briefly discussed on the chat was key generation<br>and secret storage.<br><br>For Android we want to combine the two in an "easy" API which follows<br>the Object/Factory/Config patterns of our other systems (Pipeline,<br>Authentication, Push).<br><br>Here is a high level code flavored example of what I am talking about.<br><br>https://gist.github.com/secondsun/d602d19255b1fd085ac8<br><br>Actual work is going forward here:<br>https://github.com/secondsun/aerogear-android/tree/security<br><br>wdyt?<br>_______________________________________________<br>aerogear-dev mailing list<br>aerogear-dev@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/aerogear-dev<br></blockquote><br>_______________________________________________<br>aerogear-dev mailing list<br>aerogear-dev@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/aerogear-dev<br></blockquote></div><br></div></body></html>