<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>AES CCM encryption with Android decryption failing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13191/aes-ccm-encryption-with-android-decryption-failing</link><description>I have encrypted 12 bytes on the nrf51 and sent this + 4 byte MIC across to an Android device. 
 However, when I try to decrypt on Android using a Cipher with &amp;quot;AES/CCM/NoPadding&amp;quot; transformation and &amp;quot;BC&amp;quot; provider, I get a BadPaddingException which states</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Aug 2020 14:42:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13191/aes-ccm-encryption-with-android-decryption-failing" /><item><title>RE: AES CCM encryption with Android decryption failing</title><link>https://devzone.nordicsemi.com/thread/266039?ContentTypeID=1</link><pubDate>Mon, 24 Aug 2020 14:42:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eebed49b-5f47-4f37-9700-40170e67840a</guid><dc:creator>codebreaker176</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you please tell me the code you used for encrypting on nordic device and decrypting in java&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AES CCM encryption with Android decryption failing</title><link>https://devzone.nordicsemi.com/thread/177915?ContentTypeID=1</link><pubDate>Fri, 22 Mar 2019 18:55:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76059819-0019-4e20-bd63-8f2f20b87e62</guid><dc:creator>Iiridayn</dc:creator><description>&lt;p&gt;&lt;strong&gt;&lt;a href="https://stackoverflow.com/q/46432516/118153"&gt;https://stackoverflow.com/q/46432516/118153&lt;/a&gt;&amp;nbsp;might be relevant to you.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AES CCM encryption with Android decryption failing</title><link>https://devzone.nordicsemi.com/thread/50310?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2016 13:53:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:708fd06b-3d9d-4816-829f-89e8ec65a04e</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@mazshar : I not an Android developer, but it could be that the Android BLE stack does not use the Cipher class to encrypt the link, but rather an internal crypto library.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AES CCM encryption with Android decryption failing</title><link>https://devzone.nordicsemi.com/thread/50309?ContentTypeID=1</link><pubDate>Mon, 09 May 2016 18:14:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bb3eda2-6a87-46ef-b006-1879674c719c</guid><dc:creator>Maz Shar</dc:creator><description>&lt;p&gt;@Jay Unfortunately not. I ended up using ECB instead and found an open source ECB software library to decrypt&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AES CCM encryption with Android decryption failing</title><link>https://devzone.nordicsemi.com/thread/50308?ContentTypeID=1</link><pubDate>Sat, 07 May 2016 02:02:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdbcaff1-bf90-48b3-9f32-ca1d32f8600c</guid><dc:creator>Jay</dc:creator><description>&lt;p&gt;Maz did you find a workaround for this on the Android side? Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AES CCM encryption with Android decryption failing</title><link>https://devzone.nordicsemi.com/thread/50307?ContentTypeID=1</link><pubDate>Mon, 18 Apr 2016 10:30:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4696a7d6-9c42-427e-95de-e6f976a57e03</guid><dc:creator>Maz Shar</dc:creator><description>&lt;p&gt;Could you explain how this is possible if on the nrf51 it sends 4 bytes MIC and Android expects 8? How can Android successfully decrypt?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AES CCM encryption with Android decryption failing</title><link>https://devzone.nordicsemi.com/thread/50306?ContentTypeID=1</link><pubDate>Mon, 18 Apr 2016 07:39:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:195a3743-186b-4d89-9b63-4a9c708cdeef</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;AES-CCM is the encryption used by Bluetooth LE so there should not be any compatibility issues with the nRF51&amp;#39;s AES-CCM module and Android Bluetooth stack.&lt;/p&gt;
&lt;p&gt;As far as I know there is no way to change the size of the MIC from 4 to 8 bytes.&lt;/p&gt;
&lt;p&gt;-Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>