1

I have implemented a Kerberos server/client using sockets in Java, where the client sends his service-TGT to the server, and the server knows the client is authentic.

My main concern is the snooping 'man-in-the-middle' attack. Someone could capture the TGT, and pretend to be the client.

In a pure Java implementation, this is no problem, as further communication is encrypted with the service session keys (GSSContext.wrap()/GSSContext.unwrap()), which the snooper does not have.

But the client app needs to be re-written in C#.

I figure my two options for keeping communication encrypted are:

  1. Write my own wrap() and unwrap() methods in C#
  2. Use SSL/TLS.

Is option 1 possible, before I look into SSL as an option?

djb
  • 1,635
  • 3
  • 26
  • 49

1 Answers1

3

Option 1 involves some heavy code porting which you may or not may have time to do. Option 2 sounds good.

There is option 3 which depends on your constraints, use a private encrypted TCP channel, which should be faster than SSL/TLS, but as I said may not be applicable. It could use symmetric encryption, having initialized by the session keys (which are secret)

NT_
  • 2,660
  • 23
  • 25
  • I've got SSL to work, because i figured option 1 would be painful. I can't really use a private key scenario, because the client app could be decompiled to work it out. SSL/TLS seems like the way to go. Thanks – djb Oct 21 '09 at 12:14
  • 1
    Great to have been of help. Just to clarify, I meant that the symmetric encryption algorithm could use the session key as its secret. This would not be hardcoded and would change on every session. – NT_ Oct 21 '09 at 13:38