Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I'm creating a communications protocol for a custom device, and originally I planned to simply use Transport Level Security (TLS) as the means of security/encryption. I've been instructed (this is for a job) that Application Level Security (ALS, which I believe would have to be defined by me) must be used instead, with very vague justifications behind this decision.

In what sort of situations is TLS inappropriate (where ALS is appropriate)?

Is it likely that in the course of creating this ALS scheme, I'm likely to end up reimplementing (poorly) TLS, just at the application level?

share|improve this question
1  
If you write something yourself, do it on top of TLS. –  CodesInChaos Aug 14 '13 at 19:22
    
Is your communication always between two parties? TLS provides almost all you need for communication between two parties, but scenarios involving more entities tend to require additional or alternate security protocols. –  Gilles Aug 14 '13 at 20:18
    
It is between two parties. –  Anssssss Aug 14 '13 at 21:01

2 Answers 2

up vote 3 down vote accepted

TLS is useful for point to point security, where there is no middle party, and limited to one hop.

Application Level security (ALS) probably means Message-level security, such as the WS-Security specification, which allow for:

  • End to end security (versus point to point in TLS)
  • Increased flexibility (parts of the message instead of the entire message can be signed/encrypted)
  • Support for multiple transports (TCP, UDP, I've even seen SMTP, and more)
  • Support for a wide set of credentials and claims.

The disadvantages are

  • No media streaming. Message security is out of order and a stream of bits isn't possible unless in-order receipt and retransmission is guaranteed by a supporting protocol.
  • Slower than TCP. Multiple hops imply higher latency
  • No hardware accelerators are available (or are hard to find)
  • Message security can be hard to interoperate with other vendors. XML security support varies by vendor.

A lot more on this topic exists on Microsoft's WCF site.

Ideally you may want to consider Transport Security and Message Credentials:

Securing a service with both transport and message credentials uses the best of both Transport and Message security modes in Windows Communication Foundation (WCF). In sum, transport-layer security provides integrity and confidentiality, while message-layer security provides a variety of credentials that are not possible with strict transport security mechanisms

share|improve this answer
    
PS- If you're using Java, you probably want Java Metro. Linux platforms can run .NET under Mono which also has a WCF component –  makerofthings7 Aug 15 '13 at 0:52

Usually, when people say that they don't want TLS but something called "application-level", then the raw, naked truth is that they don't know what they are blabbering about.

Mind the "usually", though: there are situations where TLS is insufficient, and something else is needed and is to be applied at some level which can be dubbed "application". Main case is when some client has to send requests with some sort of enforceable responsibility; in short words, when requests must be signed so that, should problems occurs, the request could serve as proof during a trial. TLS does not do signatures; it uses signatures internally, but only for authentication. The client can be sure that it talks to the right server (and also vice versa, if client certificates are used), but it has no proof which could be convincing in the eyes of a judge.

Of course, people who require "ALS" but cannot give decent specifications are unlikely to be aware of such subtleties. They are probably just applying some piece of dogma that they do not understand. To counter that, do as they ask: implement some Application-Level Security which consists in exchanging "messages" as "sequences of bytes" which happen to be identical to what is described in RFC 5246.

This point has been made before, brilliantly, in an easy-to-grasp graphic format:

enter image description here

(I hope Scott Adams' lawyers will forgive me for quoting this remarkable piece of wisdom.)

share|improve this answer
    
The client (central app that collects data from the devices) and server (device) would both use certificates. So it seems like that would be sufficient for our purposes. I've heard TLS doesn't work in cases where the connection is tunneled through some other protocol or done through a mesh network. Also, implementing this ALS wrapper around TLS seems to make my lazy-senses tingle (i.e. I don't want to redo work that someone else has already done and made in a free or purchasable form). :-) –  Anssssss Aug 14 '13 at 21:10
    
@Anssssss WS-Security can use certificates with Message security and might accomplish what you're looking for. It won't be perfect, since criticisms of WS-Security exist. –  makerofthings7 Aug 15 '13 at 0:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.