8

ECMA-48 (Fifth Edition, 1991) section 8.3.94 (page 53, PDF page 67) defines "PM - PRIVACY MESSAGE" as:

PM is used as the opening delimiter of a control string for privacy message use. The command string following may consist of a sequence of bit combinations in the range 00/08 to 00/13 and 02/00 to 07/14. The control string is closed by the terminating delimiter STRING TERMINATOR (ST). The interpretation of the command string depends on the relevant privacy discipline.

But, what is a "privacy discipline"? My guess is that it means message encryption, and hence PM was intended to convey messages used to negotiate the use of encryption – conceptually similar to the Telnet Encryption Option (RFC2946), SASL (RFC4422), etc. Is my guess correct?

I found another source Summary of ANSI standards for ASCII terminals by Joe Smith, dated 18 May 1984, which says:

==============================================================================
    C1 set of 8-bit control characters (from ANSI X3.64-1979)

Oct Hex Name *  (* marks function used in DEC VT series or LA series terminals)
--- -- - --- -  --------------------------------------------------------------
...
220 90 P DCS *  Device Control String, terminated by ST (VT125 enters graphics)
...
234 9C \ ST  *  String Terminator (VT125 exits graphics)
235 9D ] OSC    Operating System Command (reprograms intelligent terminal)
236 9E ^ PM     Privacy Message (password verification), terminated by ST
237 9F _ APC    Application Program Command (to word processor), term by ST

Which suggest PM may actually have something to do with passwords?

I found a copy of ANSI X3.64-1979 (republished as FIPS 86), which has this to say about PM (page 44, PDF page 46):

The interpretation of the privacy message is subject to the individual privacy and security methods in effect. Applications utilizing the Privacy Message delimiter will most often have some graphic representation for PM.

The last sentence is rather intriguing, although then I realise it says the same thing about OSC, APC and ST – all it seems to mean is that although OSC/APC/PM are not directly displayed to the user, developers should separately provide some visual indication that one has been sent.

And did anyone ever actually use it? All the other "string" C1 controls have been used by systems over the years, even if infrequently:

  • OSC (OPERATING SYSTEM COMMAND) is supported by xterm to set window title, change palettes, etc. Various other terminal emulators have supported it for this and other purposes. The iRMX operating system supports using it to modify the configuration of its terminal driver.
  • APC (APPLICATION PROGRAM COMMAND) is used by some Kermit implementations to embed Kermit commands, and has also seen various other uses
  • DCS (DEVICE CONTROL STRING) was used by physical terminals, such as DEC VT series, to remotely modify the terminal configuration – for example, by loading software fonts. It was also used to embed Sixel and ReGIS graphics.
  • SOS (START OF STRING) is used by MARC 21 (a standard for exchanging library catalogue data), to mark characters within a field which should be ignored when sorting records by that field

But I can't find any references to any system ever using PM sequences. Did anybody?

2

2 Answers 2

5

GNU Screen recognizes PM ... ST and uses it to display a short popup message to the user. (Basically ignoring the "Privacy" part of the name.)

Like with other sequences, it seems to only recognize the ESC-prefixed form, ESC ^ ... ESC \\, and not the 8-bit form.

$ printf '\e^Hello!\e\\'

(This is in the same way that OSC is only recognized in the form ESC ], for example.)

5
  • 2
    Welcome. A nit: ESC [ is CSI, as far as I recall.
    – dave
    May 12, 2023 at 11:56
  • Manual link: gnu.org/software/screen/manual/html_node/Privacy-Message.html – I wonder why they decided to use PM to implement this. You are right, it doesn't sound very "private" May 13, 2023 at 0:43
  • 1
    Interestingly, this feature has been in screen ever since the first public release of March 1987 – groups.google.com/g/net.sources/c/5V9QWdIynTY/m/nrJLMWpznEUJ – so why they chose PM may be lost to the mists of time May 13, 2023 at 1:06
  • 1
    My guess would be that PM was chosen because it was a sequence that wouldn't already be emitted by any existing program running in 'screen'.
    – dave
    May 13, 2023 at 10:02
  • If I were designing a terminal and had to guess what "privacy" was supposed to mean, I would guess that it's intended for something vaguely analogous to "spoiler" tags, but with an easy way of showing/hiding information, and--for presentations where a public display mostly echos a presenter's display--indicating that some information should only be shown on a presenter's display.
    – supercat
    May 13, 2023 at 22:33
2

[Caveat: This is distilled from the only application I've ever seen using the PM/ST mechanic]

But, what is a "privacy discipline"?

Stuff specific to an application.

My guess is that it means message encryption, and hence PM was intended to convey messages used to negotiate the use of encryption – conceptually similar to the Telnet Encryption Option (RFC2946), SASL (RFC4422), etc. Is my guess correct?

No. You're trying to rationalize backward, but PM ... ST was from way before today's craze about privacy and all around that. It is simply a forward thinking measure to allow tunnelling of private messages between a host application and application/customer specific soft/hardware without interfering with any existing or future.

The purpose is to allow seamless integration and handling of non standard (STT) extensions. It's definition guarantees that every standard conform terminal hard-/software or emulation will ignore the marked contend.

The separation from similar working PM is to make sure no future DCS command will collide with any PM string or vice versa. Same goes for OSC and ASC. They are all essentially early ways to create dedicated namespaces for either command extensions.

4
  • 2
    I'm not convinced. The use you describe would surely have been named "Private Message", not "Privacy Message", likewise "private discipline" and not "privacy discipline". The latter makes no sense for that use-case. Other cases of private use (e.g. certain final characters in CSI, and the PU1/PU2 controls) say "private" not "privacy", In short, I believe privacy means exactly privacy.
    – dave
    May 13, 2023 at 10:56
  • @another-dave Could well be, I have no authority on that nor can I cite any sources. The only case I ever have them seen used was exactly fot that kind of 'privat' messages used to tunnel messages to additional hardware. Regarding PU1/2, they are single escape sequences, not strings. Purpose of PM (and it's siblings) is to provide opaque container for strings containing (next to) everything up to a defined delimiter, which PU* does not.
    – Raffzahn
    May 13, 2023 at 11:10
  • The problem with your explanation, is if it is just to support application-specific extensions, that's the same thing as APC. It appears the authors of the standard intended APC and PM to perform different purposes–otherwise, why did they provide different definitions for them in the standard? May 15, 2023 at 8:17
  • @SimonKissane As said, all I can report is about the one time I've seen it in use.
    – Raffzahn
    May 15, 2023 at 8:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .