Автор: Евгений Афанасьев 
Здравствуйте.
Смотрите примеры с классом EnvelopedSignature, в пакете CAdES/enveloped архива samples-sources.jar в дистрибутиве jcp, и в javadoc/cades-javadoc.jar в описании класса в дистрибутиве.
Здравствуйте! не получается...
можете подсказать в чем причина , за основу был взят пример EnvelopedDataAsByteArrayExample и метод decryptAsByteArray
вот пример
final KeyStore hdImageStore = KeyStore.getInstance(CMStools.STORE_TYPE, JCP.PROVIDER_NAME);
hdImageStore.load(null, null);
final PrivateKey recipientKey = (PrivateKey) hdImageStore.getKey("TEST CERT","123456".toCharArray());
final X509Certificate recipientCert = (X509Certificate) hdImageStore.getCertificate("TEST CERT");
System.out.println("recipientKey: " + recipientKey);
System.out.println("recipientCert: " + recipientCert);
final byte[] data = Array.readFile(enveloped);
EnvelopedSignature signature = new EnvelopedSignature(new ByteArrayInputStream(data));
signature.decrypt(recipientCert,recipientKey, decryptedByteDataStream);
Exception in thread "main" ru.CryptoPro.CAdES.exception.EnvelopedException: Decoding of encrypted context failed
at ru.CryptoPro.CAdES.EnvelopedSignature.a(Unknown Source)
at ru.CryptoPro.CAdES.EnvelopedSignature.decrypt(Unknown Source)
at EnvelopedDataAsStreamExample.decryptAsByteArray(EnvelopedDataAsStreamExample.java:198)
at EnvelopedDataAsStreamExample.encryptDecrypt(EnvelopedDataAsStreamExample.java:104)
at EnvelopedCMSAsStreamExample.envelope(EnvelopedCMSAsStreamExample.java:122)
at EnvelopedCMSAsStreamExample.main_group_exchange(EnvelopedCMSAsStreamExample.java:66)
at EnvelopedCMSAsStreamExample.main(EnvelopedCMSAsStreamExample.java:46)
Caused by: ru.CryptoPro.CAdES.exception.EnvelopedException: Input cipher initiation failed
at ru.CryptoPro.CAdES.pc_1.pc_1.cl_0.<init>(Unknown Source)
at ru.CryptoPro.CAdES.pc_1.pc_1.cl_1.getRecipientOperator(Unknown Source)
at org.bouncycastle.cms.KeyTransRecipientInformation.getRecipientOperator(Unknown Source)
at org.bouncycastle.cms.RecipientInformation.getContentStream(Unknown Source)
at org.bouncycastle.cms.RecipientInformation.getContent(Unknown Source)
... 7 more
Caused by: com.objsys.asn1j.runtime.Asn1TagMatchFailedException: ASN.1 decode error @ offset 0:
Tag match failed: expected [UNIVERSAL 16], parsed [UNIVERSAL 4]
at com.objsys.asn1j.runtime.Asn1Type.matchTag(Asn1Type.java:449)
at com.objsys.asn1j.runtime.Asn1Type.matchTag(Asn1Type.java:466)
at ru.CryptoPro.JCP.ASN.Gost28147_89_EncryptionSyntax.Gost28147_89_Parameters.decode(Gost28147_89_Parameters.java:55)
at com.objsys.asn1j.runtime.Asn1Type.decode(Asn1Type.java:218)
... 12 more