Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 510443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:06:51+00:00 2026-05-13T07:06:51+00:00

This is another question in the line of getting C# and PHP to exchange

  • 0

This is another question in the line of getting C# and PHP to exchange signed pieces of data. In my scenario, I have a signed C# assembly on the client side with a public key. I also have a PHP page on the server with a private key. I want to be able to sign some data in PHP with the private key and check the signature against the public key in C# on the client.

I’ve figured out how to generate a public/private key file with sn.exe (duh). This is the
format I need for .NET to sign assemblies etc. Once signed, the assembly can provide the public key as a property (something like Assembly.GetName().PublicKey)

Also, I’ve figured out, that I probably want to use the openssl_sign() function to create a signature for the data. The example shows reading in a fixed length of bytes from a .pem file. This file I don’t have.

I guess the .pem file is just a way of storing the public / private key information, comparable to the XML and CspBlob stuff I can generate with the RSACryptoServiceProvider. What is the relation between these formats? How can I convert one to the other?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:06:51+00:00Added an answer on May 13, 2026 at 7:06 am

    To exchange secure information, you should not to use private/public pair generated by sn.exe as that meant to be used to sign a .NET assembly. Assuming both languages implemented cryptography algorithm correctly, you just need to use same keys (string values) and same algorithm. Can’t be that hard =)

    Please, take a look here: Generating Keys for Encryption and Decryption as it contains more information about how you can use public/private keys in .NET side.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this kind of follows on from another question of mine. Basically, once I have
Ok another WPF question, well I guess this is just general .NET. I have
Now I have seen this question in another forum but it didn't had an
I saw this tip in another question and was wondering if someone could explain
In a comment on this answer to another question , someone said that they
I'll try to explain this better on another question. This is the query that
This question is based on another question of mine (thankfully answered). So if in
This question is related to another question which I asked yesterday! List all links
I saw this in an answer to another question , in reference to shortcomings
(I asked this question in another way , and got some interesting responses but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.