Donate!

Msor To Sor: Convert

Off-the-Record (OTR) Messaging allows you to have private conversations over instant messaging by providing:

Encryption
No one else can read your instant messages.
Authentication
You are assured the correspondent is who you think it is.
Deniability
The messages you send do not have digital signatures that are checkable by a third party. Anyone can forge messages after a conversation to make them look like they came from you. However, during a conversation, your correspondent is assured the messages he sees are authentic and unmodified.
Perfect forward secrecy
If you lose control of your private keys, no previous conversation is compromised.

Primary download: Win32 installer for pidgin-otr 4.0.2 (sig) [other downloads]

Msor To Sor: Convert

Mastering the Matrix: A Complete Guide to Convert MSOR to SOR

In the world of numerical linear algebra and high-performance computing, efficiency is king. When dealing with large, sparse systems of equations (of the form ( Ax = b )), direct solvers (like Gaussian elimination) often become impractical due to memory and time constraints. This is where iterative methods like SOR (Successive Over-Relaxation) and its less common cousin, MSOR (Modified Successive Over-Relaxation), come into play.

But what happens when you have an algorithm or codebase written for MSOR, and you need to convert MSOR to SOR? Perhaps you are debugging convergence issues, optimizing for a symmetric problem, or standardizing legacy code.

This article provides an exhaustive, step-by-step guide on how to convert MSOR to SOR. We will cover the mathematical foundations, algorithmic differences, practical code translation, and the performance trade-offs of each method.

3. MSOR Generalization

MSOR allows a different relaxation parameter ( \omega_i ) for each equation (or for blocks). The iteration becomes:

[ x_i^(k+1) = (1-\omega_i) x_i^(k) + \frac\omega_ia_ii \left( b_i - \sum_j=1^i-1 a_ij x_j^(k+1) - \sum_j=i+1^n a_ij x_j^(k) \right) ] convert msor to sor

If ( \omega_i = \omega ) for all ( i ), MSOR collapses to standard SOR.


Procedure (algorithmic steps)

  1. Parse MSOR input into a list L of tokens (operations/variables) with metadata:

    • Unique identifier
    • Dependencies: set of predecessors that must occur before this token
    • Side-effects (reads/writes) and resource conflicts
    • Original SOR rank if available (used for tie-breaking)
  2. Build a directed acyclic graph (DAG):

    • Nodes = tokens
    • Edges u -> v if token u must precede v (from dependencies or write-read/write-write conflicts)
  3. Validate DAG:

    • If a cycle exists, report error (cyclic dependency). Attempt to break by:
      • Reporting conflicting tokens and required human resolution, or
      • If allowed, insert explicit synchronization/atomic operations to serialize the conflict (policy decision).
  4. Topological sort to produce SOR:

    • Use Kahn’s algorithm or DFS topological sort.
    • For deterministic ordering among multiple available nodes, apply tie-breakers in this order: a. Native SOR rank (if provided) b. Lexicographic order of token identifiers c. Original MSOR relative order (stable sort)
  5. Post-processing:

    • Validate produced sequence against original semantics:
      • Re-run dependency checks to ensure all constraints satisfied.
      • Optionally run lightweight static checks or unit tests.
    • If side-effect semantics change (e.g., changes in observable timing), annotate or flag for review.
  6. Output:

    • Emit SOR sequence as a list.
    • Provide a mapping table from original MSOR positions to SOR positions (for traceability).
    • If any cycles or unresolved conflicts were found, include a short error report listing problematic tokens and suggested remediation.

Goal

Produce a deterministic procedure that takes an MSOR sequence and produces the equivalent SOR sequence while preserving semantic dependencies and effects. Mastering the Matrix: A Complete Guide to Convert

2. Standard SOR Formulation

For a system ( Ax = b ) with ( A = D - L - U ) (diagonal ( D ), strictly lower ( L ), strictly upper ( U )), the SOR iteration is:

[ x_i^(k+1) = (1-\omega) x_i^(k) + \frac\omegaa_ii \left( b_i - \sum_j=1^i-1 a_ij x_j^(k+1) - \sum_j=i+1^n a_ij x_j^(k) \right) ]

where ( \omega ) is a constant relaxation parameter.


Why Convert MSOR to SOR?

You might need to convert MSOR to SOR for several practical reasons: Procedure (algorithmic steps)

  1. Simplicity: SOR has only one parameter to tune. MSOR requires tuning two (or more) parameters, which is complex.
  2. Convergence Guarantees: For symmetric positive definite (SPD) matrices, SOR converges if ( 0 < \omega < 2 ). MSOR's convergence is trickier and may diverge even for SPD matrices if ( \omega_1 ) and ( \omega_2 ) are not chosen carefully.
  3. Software Compatibility: Many legacy or standard libraries (like some implementations in LAPACK or custom engineering solvers) only support SOR.
  4. Performance Analysis: When debugging slow convergence, stripping MSOR back to SOR (with ( \omega_1 = \omega_2 )) helps isolate whether the issue is the problem itself or the parameter splitting.

Part 2: The Mathematical Conversion Process

To convert MSOR to SOR, you have two primary strategies. The choice depends on whether your MSOR parameters are identical or different.

Converted SOR call - choose an effective omega

omega_effective = 1.5 # Based on heuristic x_sor = sor_solve(A, b, omega=omega_effective)

Downloads

OTR library and toolkit

This is the portable OTR Messaging Library, as well as the toolkit to help you forge messages. You need this library in order to use the other OTR software on this page. [Note that some binary packages, particularly Windows, do not have a separate library package, but just include the library and toolkit in the packages below.] The current version is 4.1.1.

README

UPGRADING from version 3.2.x

Source code (4.1.1)
Compressed tarball (sig)

Java OTR library

This is the Java version of the OTR library. This is for developers of Java applications that want to add support for OTR. End users do not require this package. It's still early days, but you can download java-otr version 0.1.0 (sig).

OTR plugin for Pidgin

This is a plugin for Pidgin 2.x which implements Off-the-Record Messaging over any IM network Pidgin supports. The current version is 4.0.2.

README

Source code (4.0.2)
Compressed tarball (sig)
Windows (4.0.2)
Win32 installer for pidgin 2.x (sig)
Win32 zipfile (manual installation) for pidgin 2.x (sig)

OTR localhost AIM proxy

This software is no longer supported. Please use an IM client with native support for OTR.

This is a localhost proxy you can use with almost any AIM client in order to participate in Off-the-Record conversations. The current version is 0.3.1, which means it's still a long way from done. Read the README file carefully. Some things it's still missing:

But it should work for most people. Please send feedback to the otr-users mailing list, or to . You may need the above library packages.

README

Source code (0.3.1)
Compressed tarball (sig)
Windows (0.3.1)
Win32 installer (sig)
OS X (0.3.1)
OS X package

Source Code Repository and Bugtracker

You can find a git repository of the OTR source code, as well as the bugtracker, on the otr.im community development site:

Mailing Lists

If you use OTR software, you should join at least the otr-announce mailing list, and possibly otr-users (for users of OTR software) or otr-dev (for developers of OTR software) as well.

Documentation

Installation and Setup Guides

pidgin-otr tutorial from the Security-in-a-Box project
Video OTR tutorial (by Niels)
Adium, Pidgin & OTR (auf Deutsch, by Christian Franke)
Miranda, Pidgin, Kopete & OTR (auf Deutsch, by Missi)
Adium X with OTR
OTR proxy on Mac OS X
pidgin-otr on gentoo (from "X")
gaim-otr on Debian unstable (from Adam Zimmerman)
gaim-otr on Windows (from Adam Zimmerman)
gaim-otr 3.0.0 on Ubuntu (from Adam Zimmerman). Note that Ubuntu breezy has gaim-otr 2.0.2 in it, and all you should have to do is "apt-get install gaim-otr".

We would greatly appreciate instructions and screenshots for other platforms!

About OTR

Here are some documents and papers describing OTR. The CodeCon presentation is quite useful to get started.

Frequently Asked Questions

What implementations of Off-the-Record Messaging are there?
Please see our OTR-enabled software page. The OTR functionality is separated into the Off-the-Record Messaging Library (libotr), which is an LGPL-licensed library that can be used to (hopefully) easily produce OTR plugins for other IM software, or for other applications entirely.
What is the license for the OTR software?
The Off-the-Record Messaging Library is licensed under version 2.1 of the GNU Lesser General Public License. The Off-the-Record Toolkit, the pidgin-otr plugin, and the OTR proxy are licensed under version 2 of the GNU General Public License.
How is this different from the pidgin-encryption plugin?
The pidgin-encryption plugin provides encryption and authentication, but not deniability or perfect forward secrecy. If an attacker or a virus gets access to your machine, all of your past pidgin-encryption conversations are retroactively compromised. Further, since all of the messages are digitally signed, there is difficult-to-deny proof that you said what you did: not what we want for a supposedly private conversation!
How is this different from Trillian's SecureIM?
SecureIM doesn't provide any kind of authentication at all! You really have no idea (in any kind of secure way) to whom you're speaking, or if there is a "man in the middle" reading all of your messages.
How is this different from SILC?
SILC uses a completely separate network of servers and underlying network protocol. In some environments, such as firewalled or corporate setups, where a local proprietary IM protocol may be in use, SILC may not be available. Further, in its normal mode of operation, all SILC messages are shared with the SILC servers; if you want to send messages that can only be read by the person with whom you're communicating, you need to either (1) arrange a pre-shared secret in advance (which hampers perfect forward secrecy), or (2) be able to do a direct peer-to-peer connection to the other person's client, in order to do a key agreement (which may not be possible in a NAT or firewall situation).

Is your question not here? Ask on the otr-users mailing list!