spongycastle

Why doesn't Google Cloud Key Management Service's Java client library support Android?

折月煮酒 提交于 2019-12-24 09:04:09
问题 It is documented as not supporting Android. Why? Is it just because Android's BouncyCastle 's implementation is shrunk down on features and doesn't support things like KeyPairGenerator/ECDSA (Elliptic Curve Digital Signature Algorithm)? (Here's another link on that.) Wouldn't it be enough to just use SpongyCastle instead? Is it just because Google doesn't support SpongyCastle that its KMS Java client doesn't support Android? 回答1: https://github.com/GoogleCloudPlatform/google-cloud-java/issues

Unlimited Strength Jce and Android

痞子三分冷 提交于 2019-12-23 17:48:17
问题 I'm using SpongyCastle (full implementation of BouncyCastle's crypto functions for Android) and I have a bks that contains a key of size 384. I'm trying to extract that key using the method KeyStore.getKey(alias, password) as you would any key in a keystore. But what I'm running into is the error java.security.UnrecoverableKeyException: no match . Doing a little bit of research indicates that it might be because the key size is too big for Android to handle which makes sense as my program

Using Spongycastle with Proguard

安稳与你 提交于 2019-12-22 10:39:00
问题 I've been strugling with proguard to make Spongycastle work. Most of the time, the problem comes when I'm exporting a signed APK, either I've got error, or the app will just crash before starting. So, I've managed to gather informations to get a working proguard configuration : -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers -dontpreverify -verbose -repackageclasses '' -allowaccessmodification -keepattributes *Annotation

Are there advantages for using SpongyCastle over BouncyCastle, if targeting Android 3.0 and later?

泄露秘密 提交于 2019-12-22 04:42:55
问题 If I understand the situation correctly, SpongyCastle is a renaming of BouncyCastle and it was created to give people the ability to include a new version of BouncyCastle on Android, since just including the latest BouncyCastle jar would cause conflicts with the old and stripped down version of BouncyCastle that came with Android. However, apparently since version 3.0 (in 2011 - 6 years ago!) the Android BouncyCastle package was renamed to com.android.org.bouncycastle , so that now if you

How to fix error of Spongy Castle on Android: could not find class java.awt.datatransfer.DataFlavor

北城以北 提交于 2019-12-21 21:38:41
问题 I use lib Spongy Castle for signing and encrypting mail on Android according to this example. /* Add BC */ Security.addProvider(new BouncyCastleProvider()); /* Open the keystore */ KeyStore keystore = KeyStore.getInstance("PKCS12", "SC"); keystore.load(new FileInputStream(pkcs12Keystore), password.toCharArray()); Certificate[] chain = keystore.getCertificateChain(keyalias); /* Get the private key to sign the message with */ PrivateKey privateKey = (PrivateKey) keystore.getKey(keyalias,

RSA using SpongyCastle

做~自己de王妃 提交于 2019-12-18 14:02:09
问题 My knowledge of encryption is very basic, so apologies for any ignorance on my part. Within an Android app I am currently trying to mimic the execution of this command using the SpongyCastle library and standard java.security libs: echo 'test' | openssl rsautl -encrypt -pubin -inkey test.pub | base64 > encrypted_file It should be noted that the reading/writing to and from files in the command are not going to be implemented and I have my public key (i.e. test.pub ) as a Base64 encoded string

Client Certificate not working from Android - How to debug?

萝らか妹 提交于 2019-12-12 07:08:13
问题 I'm trying to implement a Client Certificates communication for an Android App, so far without much success - and it seems that this feature is, if at all possible, very hard. The full flow I'm implementing is described in my previous question. I followed the code there and code from this blog post, describing the same scenario, more or less, without results. What doesn't work: Opening an SSL Connection ( HttpsURLConnection ) between the Android Client and the Server causes the server to

java.io.IOException: Can't process class when running ProGuard in Maven build of Android project

99封情书 提交于 2019-12-11 22:01:54
问题 I use a library called iText to write new information to existing PDFs. In order to encrypt PDFs, iText (for Android) uses a library called SpongyCastle which is an Android port of BouncyCastle. Unfortunately, both iText and Spongycastle contain a very large number of methods (15k+). In Android there is a hard limit to the number of methods you can use (64k). Fortunately, iText does not use many classes in the Spongycastle jar. I was able to unzip the Spongycastle jar and remove all of the

Using Spongy Castle library to generate a key pair in ECDH

北慕城南 提交于 2019-12-11 00:28:46
问题 I am a student in Taiwan. I am learning how to programming in Android. but I have a problem about using Spongy Castle library to generate a key pair in ECDH. when I start the app, android system shows the app has stopped. Here is my code and my import public class MainActivity<ECParams> extends Activity { String msg,Test; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button generator= (Button)

Spongycastle is missing many algorithms when loaded on android

耗尽温柔 提交于 2019-12-08 02:05:50
问题 In this stackoverflow answer you can see a code to print all available providers and corresponding algorithms: How to find out what algorithm [ encryption ] are supported by my JVM? I am using latest version of spongycastle and when I ask to get the algorithms of Spongycastle ("SC") on android I get only a handful of algorithm. In fact I get this very limited list : provider: SC algorithm: PBEWITHMD5ANDDES algorithm: PBEWITHSHA256AND192BITAES-CBC-BC algorithm: OLDHMACSHA384 algorithm: