bc-csharp icon indicating copy to clipboard operation
bc-csharp copied to clipboard

Signing with Token (USB)

Open israelaece opened this issue 5 years ago • 1 comments

I'm using BC to sign documents where certificates are stored in an USB token. Natively, the BC can't read because private keys aren't exportable.

I found in web a custom class called CmsSignedDataGenWithRsaCsp that uses RSACryptoServiceProvider (from System.Security.Cryptography namespace) and works fine.

Why not include this kind of feature into BC library? For those that develops on Windows platform would be perfect, where all we need would be embeded in the library.

israelaece avatar Dec 03 '20 10:12 israelaece

Estou usando o BC para assinar documentos onde os certificados são armazenados em um token USB. Nativamente, o BC não pode ler porque as chaves privadas não podem ser exportadas.

Encontrei na web uma classe personalizada chamada CmsSignedDataGenWithRsaCspque usa RSACryptoServiceProvider(do System.Security.Cryptographynamespace) e funciona bem.

Por que não incluir esse tipo de recurso na biblioteca BC? Pois quem desenvolve na plataforma Windows seria perfeito, onde tudo o que precisaríamos estaria embutido na biblioteca.

Amigo, tudo bem? Você conseguiu acessar o token pelo Bouncycastle?

Weiderson avatar Feb 03 '21 17:02 Weiderson