<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 10, 2013 at 3:09 PM, Bruno Oliveira <span dir="ltr"><<a href="mailto:bruno@abstractj.org" target="_blank">bruno@abstractj.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ahoy answers inline.<br>
<div class="im"><br>
Matthias Wessendorf wrote:<br>
><br>
> On Thu, Oct 10, 2013 at 1:58 PM, Bruno Oliveira <<a href="mailto:bruno@abstractj.org">bruno@abstractj.org</a><br>
</div><div class="im">> <mailto:<a href="mailto:bruno@abstractj.org">bruno@abstractj.org</a>>> wrote:<br>
><br>
><br>
><br>
> Matthias Wessendorf wrote:<br>
> > Thanks for putting together the gist; I did read several times over<br>
> > it, and I guess it mostly makes sense :-)<br>
> ><br>
> > However I do have a few (minor?) questions:<br>
> ><br>
> > ===JavaScript:===<br>
> ><br>
> > * key: generatedKey,<br>
> ><br>
> > where does the generate key come from ? Is that a key that, as shown<br>
> > in the diagram, comes from "the server"?<br>
> Which kind of section are we talking about? Basically I skipped it<br>
> into<br>
> the documentation because developers are able to provide their own but<br>
> you can see an example here:<br>
> <a href="https://github.com/aerogear/aerogear-js/blob/master/tests/unit/crypto/aerogear.crypto.js#L21" target="_blank">https://github.com/aerogear/aerogear-js/blob/master/tests/unit/crypto/aerogear.crypto.js#L21</a><br>
> (that was used only for unit test purposes to guess the output)<br>
><br>
> If you think that's not enough I'm fine providing an example about how<br>
> to properly generate the key.<br>
><br>
><br>
> Not sure we need it on the gist, but I think it does not hurt.<br>
</div>No problem I will create a branch at <a href="http://aerogear.org" target="_blank">aerogear.org</a> for it and add how to<br>
properly generate the keys.<br></blockquote><div><br></div><div>that would be sweet!</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">><br>
> I understand (like in the test) that we locally generate the key, but<br>
> the first diagram (for instance) was a bit confusing. Now I understand<br>
> it is an option, e.g. to request a key from a server: so it is really<br>
> up to the developer (e.g. request a remote key), not up to our library.<br>
</div>TBH the idea of those diagrams was to suggest some scenarios to discuss<br>
with the team (to guarantee that I'm not suggesting something insane or<br>
impossible). We can do both or not, either way is possible to elaborate.<br></blockquote><div><br></div><div>makes perfectly sense, and this thread already is providing good set of info!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Scenario 1 - Let's think for a bit about the current situation, if the<br>
key is locally generated by the app and the device is stolen would be<br>
easy to an attacker to decrypt that data right? So that's the reason why<br>
that must be a remote request as you mentioned, we must be able to<br>
revoke those keys.<br></blockquote><div><br></div><div>+1</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Scenario 2- The client generate it's own key and the server also do the<br>
same. When you authorize client key on the server we are able establish<br>
a key agreement between the two parties to start the encryption tango.<br></blockquote><div><br></div><div>+1 </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Makes sense?<br></blockquote><div><br></div><div>It does!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">> Our library "just" uses any given key, or am I wrong ?<br>
</div>Our library can accept any given key for local encryption, but I would<br>
do not encourage. What all the client libraries must do to while we<br>
don't have a server?<br>
<br>
1- Generate the keys<br>
2- Encrypt the data<br>
3. Think about how to properly retrieve the key for<br>
encryption/decryption. For example: for Android I know we can do it with<br>
KeyStore<br>
<a href="http://developer.android.com/reference/java/security/KeyStore.html" target="_blank">http://developer.android.com/reference/java/security/KeyStore.html</a> (but<br>
I can be wrong)<br></blockquote><div><br></div><div>thanks for the provided information!</div><div><br></div><div>It helped</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">><br>
> ><br>
><br>
> > * PBKDF2: However, in the (outdated?) gist we use a function<br>
> > (AeroGearCrypto.pbkdf2()) to get access to the Pbkdf2 class;<br>
> I don't think so, once the code wasn't merge I can't make assumptions<br>
> into something that "might be" merged.<br>
><br>
><br>
> not sure what you mean.<br>
><br>
><br>
</div>> -Matthias<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
abstractj<br>
<br>
<br>
</font></span><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br>
<br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div></div>