473,804 Members | 3,953 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Convincing the server an app is signed properly

I'm not sure if this is possible, but I have a socket server app and a
client app. I need to convince the server that the application is signed
with the same key as the server. Is there a way to do this? I'm starting to
get concerned that it's not possible.

My thinking was that maybe the server would send a random string of data to
the client. The client could then encrypt it, send it back, and the server
would either unencrypt it or encrypt its copy of the original and compare
the two. Or something along these lines, to verify it. But that would mean
they both have a key available to them.

Am I incorrect in thinking that the key used to sign an assembly isn't
stored in the assembly? Just a hash of the key is stored?

Is there some way I can get a key into the assemblies that can be used, but
that won't be easily compromised?

Any ideas on how I could do this would be greatly appreciated.

Pete

Nov 16 '05 #1
4 1114
I would not use the strong public key as it is relatively easy to replace SN
public key with another. A harder to crack (but not perfect) method is just
store the rsa xml string in a class and obfuscate your code and encrypt the
string with your obfuscator. If you expect network access at all times, you
could also use a key exchange algo like SRP and not need to save any key.
http://www.ietf.org/internet-drafts/...tls-srp-08.txt

--
William Stacey, MVP
http://mvp.support.microsoft.com

"Fredo" <fr*****@hotmai l.com> wrote in message
news:2J******** ************@gi ganews.com...
I'm not sure if this is possible, but I have a socket server app and a
client app. I need to convince the server that the application is signed
with the same key as the server. Is there a way to do this? I'm starting to get concerned that it's not possible.

My thinking was that maybe the server would send a random string of data to the client. The client could then encrypt it, send it back, and the server
would either unencrypt it or encrypt its copy of the original and compare
the two. Or something along these lines, to verify it. But that would mean
they both have a key available to them.

Am I incorrect in thinking that the key used to sign an assembly isn't
stored in the assembly? Just a hash of the key is stored?

Is there some way I can get a key into the assemblies that can be used, but that won't be easily compromised?

Any ideas on how I could do this would be greatly appreciated.

Pete


Nov 16 '05 #2
You say you can replace the SN public key with another. Could someone
extract the SN public key from one assembly and place it in another
assembly?

In other words, would the following strategy work?

Server sends unencrypted data to client. Server encrypts a local copy and
stores the encrypted copy.
Client encrypts data and sends the encrypted data back to server.
Server compares the two encrypted copies of the data. If they match, client
has proper SN key.

So, my question is, could someone else create another app and use my public
key to perform the same communication with the server?

I think you're probably right about having to go with obfuscation with
string encryption. I was hoping to avoid going that route, but I may not
have a choice.

Pete

"William Stacey [MVP]" <st***********@ mvps.org> wrote in message
news:uD******** ******@TK2MSFTN GP12.phx.gbl...
I would not use the strong public key as it is relatively easy to replace SN public key with another. A harder to crack (but not perfect) method is just store the rsa xml string in a class and obfuscate your code and encrypt the string with your obfuscator. If you expect network access at all times, you could also use a key exchange algo like SRP and not need to save any key.
http://www.ietf.org/internet-drafts/...tls-srp-08.txt

--
William Stacey, MVP
http://mvp.support.microsoft.com

Nov 16 '05 #3
> Server sends unencrypted data to client. Server encrypts a local copy and
stores the encrypted copy.
Client encrypts data and sends the encrypted data back to server.
Server compares the two encrypted copies of the data. If they match, client has proper SN key.


Not sure what your trying to protect or do here, but I don't think the two
way conversation is required here. The client could just encrypt some data
using Rijndael and encrypt the session key using server's public key. The
server can then decrypt the Rijndael key using private key. As a public key
is public, anyone can send data to server this way if they can figure out
what is going on.

--
William Stacey, MVP
http://mvp.support.microsoft.com
Nov 16 '05 #4
Okay, well, here's the full situation: I and a group of others are working
on an open source game.

Since it's open source, the code is publicly available. For reasons that are
more complex than I'd want to go in here, a freely available client would be
modifiable such that someone could create a client that makes it easy for
the user to cheat in the game.

To avoid this, we will create builds of both clients and servers that are
"certified" . It's this "certificat ion" that we're not entirely sure how to
go about at this point.

There are basically two things that need to happen.

The first is that all communications between the client and server must be
securely encrypted, as cheating could be managed by proxying the
communications and manipulating the data exchanged between clients and
servers.

The second is that the server needs to be sure that the client is the
"certified" client and not some application pretending to be the certified
client. By certified, we mean that the client is an unmodified version of
the build that we've produced.

Now, I don't want to confuse the issue. There are ways around cheating by
controlling the information that goes to the client, but for network
performance reasons, this isn't really feasible, and that's the issue that's
more complex than I'd like to go into in detail. So, let's just assume that
isn't an option, because frankly, it just isn't.

Now, if we can handle the second issue, that is, convicing the server that
the client is an unmodified version of the build we've created, then we can
easily manage the first issue.

I understand what you're saying. By very definition, the public key is
public, so any solution that relies on the public key being secure is
obviously not going to work..

I think the solution you originally offered, which is to obfuscate the build
and using string encryption to encrypt the key internally, we might be able
to make things fairly secure. We're not dealing with bank or credit data
here, so 100% security isn't essential. What's more important is simply that
security is tight enough that it's more trouble than it's worth to try to
crack the security. After all, it's just a game. But you will get the
occasional hacker who's going to make a pretty good try at cracking it, so
security has to be pretty good.

We do want to allow for an unencrypted version of the client and server to
be available so that people can test and develop extensions to the game, but
we want to be able to secure our official releases.
"William Stacey [MVP]" <st***********@ mvps.org> wrote in message
news:ee******** ******@TK2MSFTN GP11.phx.gbl...
Server sends unencrypted data to client. Server encrypts a local copy and stores the encrypted copy.
Client encrypts data and sends the encrypted data back to server.
Server compares the two encrypted copies of the data. If they match, client
has proper SN key.


Not sure what your trying to protect or do here, but I don't think the two
way conversation is required here. The client could just encrypt some

data using Rijndael and encrypt the session key using server's public key. The
server can then decrypt the Rijndael key using private key. As a public key is public, anyone can send data to server this way if they can figure out
what is going on.

--
William Stacey, MVP
http://mvp.support.microsoft.com

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
15232
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000 Personal disk from the SQL Server 2000 Enterprise kit as this is reported here on the MSDN web site to be the version that is supported on Windows XP. In fact so many of you kind people confess to having succeeded in doing it. I have tried...
16
2461
by: Michael Rozdoba | last post by:
I'm far from a CSS expert, but what I see of it I really like & I love keeping content & style separate. I also hate the way table layout produces convoluted bulky code. However when asked why one should use CSS rather than tables, particularly when tables work & browser support of CSS can be dodgy, especially in IE, I usually fail to come up with a concise & convincing argument :/ I've been having this long running discussion with a...
1
1824
by: JP Burford | last post by:
I am working on testing zero deployment on Windows 2003 server. The application I am testing is a simple Managed application written in C#. When I access the application I receive the following error: Unhandled Exception: System.ArgumentException: Invalid directory on URL. at System.Security.CodeAccessSecurityEngine.GetZoneAndOriginInternal(ArrayList zoneList, ArrayList originList, StackCrawlMark& stackMark, Int32 checkFrames) at...
13
2957
by: bill | last post by:
I am trying to convince a client that dotNet is preferable to an Access project (ADP/ADE). This client currently has a large, pure Access MDB solution with 30+ users, which needs to be upgraded. I believe a dotNet solution is better, but I'm trying to be as convincing as possible -- and maybe I'm wrong! I would appreciate any input or references which could help me.
8
2250
by: Rade | last post by:
Following a discussion on another thread here... I have tried to understand what is actually standardized in C++ regarding the representing of integers (signed and unsigned) and their conversions. The reference should be 3.9.1 (Fundamental types), and 4.7 (Integral conversions). It seems to me that the Standard doesn't specify: 1) The "value representation" of any of these types, except that (3.9.1/3) "... The range of nonnegative...
9
4961
by: Fred Ma | last post by:
Hello, I've been trying to clear up a confusion about integer promotions during expression evaluation. I've checked the C FAQ and C++ FAQ (they are different languages, but I was hoping one would clear up the confusion), as well as googling groups and the web. The confusion is that for a binary operator,
27
4573
by: REH | last post by:
I asked this on c.l.c++, but they suggested you folks may be better able to answer. Basically, I am trying to write code to detect overflows in signed integer math. I am trying to make it as efficient as possible without resorting to assembly language, and without causing undefined behavior. That, of course, means catching the overflow before it happens. What I asked was (stripping any relevance to C++):
8
6717
by: nick | last post by:
I have only SQL Server 2005 installed on my PC. And I tried to add the following rows in web.config to use SQL Server 2005 instead of Express: <connectionStrings> <clear /> <add name="LocalSqlServer" connectionString="Data Source=.\SQL2005;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;user instance=true;Integrated Security=True;Initial Catalog=ASPNETDB;" providerName="System.Data.SqlClient" /> </connectionStrings>
2
3886
by: JohnLorac | last post by:
Hello, I'm trying to load and write file on local disc drive using signed javascript file. But I have experienced problem running this url: jar:http://www.domain.com/secure-scripts/secure.jar!/thepage.html (sample) in browser (Firefox) which simply won't work. I can't access to html file embedded in jar file. My sample applet IO.java together
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9582
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9157
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7621
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6854
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2993
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.