title: Elliptic curve encryption - ECDSA on iOS and Android
body: <p>I'm putting together an encryption strategy that will encrypt data shared between iOS and Android devices over BTLE. We would like to use a basic elliptic curve cryptography.</p>
  
  <p>We're currently implementing our iOS app and our Android app will kick-off development in the next month or so. So, my question is as follows:</p>
  
  <p>I know on iOS I can use Certificate, Key and Trust Services to generate a key pair of type kSecAttrKeyTypeECDSA. This is cool.</p>
  
  <p>And I see that the go to encryption library for Android, <a href="https://www.bouncycastle.org/" rel="nofollow">BouncyCastle</a>, also supports ECDSA. </p>
  
  <p>So, my question is.. can I count on key-pairs generated on either platform to operate the same in terms of encryption and decryption on both iOS and Android?</p>
  
  <p>i.e. </p>
  
  <p>iOS User A </p>
  
  <ul>
  <li>generated their public/private key pair using iOS ECDSA</li>
  <li>holds reference to user B's public key</li>
  </ul>
  
  <p>Android User B</p>
  
  <ul>
  <li>generated their public/private key pair using BouncyCastle ECDSA</li>
  <li>holds reference to user A's public key</li>
  </ul>
  
  <p>Can user B encode a message using user A's public key.. send the encoded data to user A and expect user A to be able to decode? </p>