public-key

Where does jwt.io get the public key from JWT token?

拈花ヽ惹草 提交于 2020-12-26 12:17:29
问题 I was decoding a JWT token via jwt.io (in the Debugger section) to see Headers, Payload. Surprisingly, it also verified, and I could see it (jwt.io debugger) is able to retrieve the public key as well. So my question is: Does JWT token provide the public key as well as part of the JWT token? I am pasting part of it (can't paste full due to security reasons, will be truncating part of the actual JWT token)

RSA should I use X.509 or PKCS #1

夙愿已清 提交于 2020-12-06 15:47:45
问题 Use case: I have a use case wherein client generates private and public key , sends the base 64 encoded public key to the server. On server side I will encrypt a message using this public key and send the encrypted message to client , which the client decrypts using its private key.The algorithm agreed upon is 'RSA'. The problem is on server side I am seeing that certain keys are working using X509EncodedKeySpec as key spec byte[] publicBytes = Base64.decodeBase64(base64EncodedPubKey);

RSA should I use X.509 or PKCS #1

空扰寡人 提交于 2020-12-06 15:47:44
问题 Use case: I have a use case wherein client generates private and public key , sends the base 64 encoded public key to the server. On server side I will encrypt a message using this public key and send the encrypted message to client , which the client decrypts using its private key.The algorithm agreed upon is 'RSA'. The problem is on server side I am seeing that certain keys are working using X509EncodedKeySpec as key spec byte[] publicBytes = Base64.decodeBase64(base64EncodedPubKey);

Verify JWT with RS256 (asymmetric) in C#

99封情书 提交于 2020-08-26 07:20:42
问题 I have some code like this which I believe is failing because it's using an Asymmetric RS256 but has "SymmetricSecurityKey()". The tokens were hand generated from https://jwt.io/ How do I convert this to use my Asymmetric public key? Also, I'm new to C# and I'd like to target dotnet standard, so I'm also wondering if I'm using the wrong libs? (I'm depending on the preview release) λ cat Program.cs using System; using System.IdentityModel.Tokens.Jwt; using System.Text; using System.Linq;

Suppress the use of host key in SFTP or SCP using WinSCP

白昼怎懂夜的黑 提交于 2020-08-05 08:53:58
问题 I am working on an application in which I am downloading files using WinSCP .NET assembly (version 5.5.0.3839) My code to download file is given below public bool ReceiveFile(string ftpFilePath,out String downloadedFileName, String DestinationPath) { bool sendingStatus = false; downloadedFileName = string.Empty; try { if (sessionOptions != null) { using (Session session = new Session()) { // Connect bool isSessionOpened = OpenSession(session); if (isSessionOpened) { // Upload files

Suppress the use of host key in SFTP or SCP using WinSCP

徘徊边缘 提交于 2020-08-05 08:51:52
问题 I am working on an application in which I am downloading files using WinSCP .NET assembly (version 5.5.0.3839) My code to download file is given below public bool ReceiveFile(string ftpFilePath,out String downloadedFileName, String DestinationPath) { bool sendingStatus = false; downloadedFileName = string.Empty; try { if (sessionOptions != null) { using (Session session = new Session()) { // Connect bool isSessionOpened = OpenSession(session); if (isSessionOpened) { // Upload files