Git Product home page Git Product logo

s22.sasl's Introduction

Introduction

This repository contains a .NET assembly implementing the "Authentication and Security Layer" (SASL) framework. SASL specifies a protocol for authentication and optional establishment of a security layer between client and server applications and is used by internet protocols such as IMAP, POP3, SMTP, XMPP and others.

Usage & Examples

To use the library add the S22.Sasl.dll assembly to your project references in Visual Studio. Here's a simple example which instantiates a new instance of the Digest-Md5 authentication mechanism and demonstrates how it can be used to perform authentication.

using System;
using S22.Sasl;

namespace Test {
	class Program {
		static void Main(string[] args) {
			SaslMechanism m = SaslFactory.Create("Digest-Md5");

			// Add properties needed by authentication mechanism.
			m.Properties.Add("Username", "Foo");
			m.Properties.Add("Password", "Bar");

			while(!m.IsCompleted)
			{
				byte[] serverChallenge = GetDataFromServer(...);
				byte[] clientResponse = m.ComputeResponse(serverChallenge);

				SendMyDataToServer(clientResponse);
			}
		}
	}
}

Features

The library supports the following authentication mechanisms:

  • Plain
  • Cram-Md5
  • NTLM
  • NTLMv2
  • OAuth
  • OAuth 2.0
  • Digest-Md5
  • Scram-Sha-1
  • SRP

Custom SASL Security Providers can be implemented through a simple plugin mechanism.

Credits

This library is copyright © 2013-2014 Torben Könke.

License

This library is released under the MIT license.

Bug reports

Please send your bug reports to [email protected] or create a new issue on the GitHub project homepage.

s22.sasl's People

Contributors

smiley22 avatar

Stargazers

Tom-- avatar Joshua "Yoshi" Askharoun avatar junyu avatar dsbenghe avatar Archie Yang avatar  avatar Andrew Hall avatar David Smith avatar Jan Meznik avatar Dmitrii Evdokimov avatar Jonas Gauffin avatar Active PHOENiX  avatar Sangkyun Yoon avatar Alexey Yakovlev avatar Martin Fryd Wochner avatar Jorge Bay avatar  avatar Albert Willemsen avatar Gustavo Rodriguez Baldera avatar Marnix van Valen avatar Rob Blackbourn avatar Arley Schrock avatar Juan Boada avatar

Watchers

Neustradamus avatar James Cloos avatar Martin Fryd Wochner avatar  avatar  avatar David Smith avatar Albert Willemsen avatar

s22.sasl's Issues

SCRAM-SHA-1-PLUS + SCRAM-SHA-224(-PLUS) + SCRAM-SHA-256(-PLUS) + SCRAM-SHA-384(-PLUS) + SCRAM-SHA-512(-PLUS) + SCRAM-SHA3-512(-PLUS) supports

After:

  • SCRAM-SHA-1

Can you add supports of :

  • SCRAM-SHA-1-PLUS
  • SCRAM-SHA-224
  • SCRAM-SHA-224-PLUS
  • SCRAM-SHA-256
  • SCRAM-SHA-256-PLUS
  • SCRAM-SHA-384
  • SCRAM-SHA-384-PLUS
  • SCRAM-SHA-512
  • SCRAM-SHA-512-PLUS
  • SCRAM-SHA3-512
  • SCRAM-SHA3-512-PLUS

"When using the SASL SCRAM mechanism, the SCRAM-SHA-256-PLUS variant SHOULD be preferred over the SCRAM-SHA-256 variant, and SHA-256 variants [RFC7677] SHOULD be preferred over SHA-1 variants [RFC5802]".

https://xmpp.org/extensions/inbox/hash-recommendations.html

-PLUS variants:

LDAP:

  • RFC5803: Lightweight Directory Access Protocol (LDAP) Schema for Storing Salted: Challenge Response Authentication Mechanism (SCRAM) Secrets: https://tools.ietf.org/html/rfc5803

HTTP:

2FA:

IANA:

Linked to:

Does this library support server-side?

Sorry for the dumb question, but does the library support the server-side part?
Is there the code to generate the challenge and validate the client responses?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.