Skip to content

Commit c340bfc

Browse files
committed
Science Commit 5.
1 parent 0a022d1 commit c340bfc

11 files changed

Lines changed: 29 additions & 14 deletions

File tree

modules/bitcoin/servlets/servlet/src/main/webapp/index.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
<p>Bitcoin wallet management, transaction indexing, and trading interface. Local bitcoind integration, multi-timezone support, and Strernary™ AI-assisted market analysis. Port 6682.</p>
8181
</div>
8282
</section>
83-
<div style="text-align:center;padding:0.5rem;font-size:0.7rem;color:<%= authorized ? \"#22c55e\" : \"#dc2626\" %>;"><%= authMsg %></div>
83+
<div style="text-align:center;padding:0.5rem;font-size:0.7rem;color:<%= authorized ? "#22c55e" : "#dc2626" %>;"><%= authMsg %></div>
8484

8585

8686
<!-- CD1 Connector Button -->

modules/black-belt/servlets/servlet/src/main/webapp/index.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</div></nav>
2828
<section class="hero"><div class="hero-inner"><span class="hero-tag">Discipline · Mastery · Methodology</span>
2929
<h1>Black Belt</h1><p>Systems design methodology built on progressive mastery. Each belt represents a level of understanding, responsibility, and IQ requirement. Ask questions about the methodology below.</p></div></section>
30-
<div style="text-align:center;padding:0.5rem;font-size:0.7rem;color:<%= authorized ? \"#22c55e\" : \"#dc2626\" %>;"><%= authMsg %></div>
30+
<div style="text-align:center;padding:0.5rem;font-size:0.7rem;color:<%= authorized ? "#22c55e" : "#dc2626" %>;"><%= authMsg %></div>
3131

3232
<!-- CD1 Connector Button + Floating Dialog (BMA Template) -->
3333
<div style="display:flex;justify-content:center;align-items:center;width:100%;padding:2rem 0;">

modules/calendar/servlets/servlet/src/main/webapp/index.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<p style="font-size:1.1rem;color:var(--text-muted);"><%= today %></p>
6464
</div>
6565
</section>
66-
<div style="text-align:center;padding:0.5rem;font-size:0.7rem;color:<%= authorized ? \"#22c55e\" : \"#dc2626\" %>;"><%= authMsg %></div>
66+
<div style="text-align:center;padding:0.5rem;font-size:0.7rem;color:<%= authorized ? "#22c55e" : "#dc2626" %>;"><%= authMsg %></div>
6767

6868

6969
<!-- CD1 Connector Button + Floating Dialog -->

modules/chat/source/ChatServer.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -572,12 +572,16 @@ private String acceptEncryption(String input, ChatSession session) {
572572
String peerHex = parts[1].trim();
573573

574574
if (session.dhPrivate != null) {
575-
BigInteger peerPub = new BigInteger(peerHex, 16);
576-
BigInteger shared = peerPub.modPow(session.dhPrivate, DH_P);
577-
session.sharedSecret = Arrays.copyOf(
578-
MessageDigest.getInstance("SHA-256").digest(shared.toByteArray()), 32);
579-
session.encrypted = true;
580-
return "ENCRYPT|ACTIVE|AES-256-GCM via DH-2048";
575+
try {
576+
BigInteger peerPub = new BigInteger(peerHex, 16);
577+
BigInteger shared = peerPub.modPow(session.dhPrivate, DH_P);
578+
session.sharedSecret = Arrays.copyOf(
579+
MessageDigest.getInstance("SHA-256").digest(shared.toByteArray()), 32);
580+
session.encrypted = true;
581+
return "ENCRYPT|ACTIVE|AES-256-GCM via DH-2048";
582+
} catch (Exception e) {
583+
return "ERROR|Encryption handshake failed: " + e.getMessage();
584+
}
581585
}
582586
return "ERROR|No DH session in progress.";
583587
}

modules/languages/servlets/servlet/src/main/webapp/index.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</div></nav>
2828
<section class="hero"><div class="hero-inner"><span class="hero-tag">Violet — Polite Diplomacy</span>
2929
<h1>Languages™</h1><p>Multi-language translation module with AI inference. Supports American, English, French, Spanish, Thai, Italian, German, Japanese, Chinese, Arabic, Russian, Ukrainian, and Turkish.</p></div></section>
30-
<div style="text-align:center;padding:0.5rem;font-size:0.7rem;color:<%= authorized ? \"#22c55e\" : \"#dc2626\" %>;"><%= authMsg %></div>
30+
<div style="text-align:center;padding:0.5rem;font-size:0.7rem;color:<%= authorized ? "#22c55e" : "#dc2626" %>;"><%= authMsg %></div>
3131

3232
<!-- CD1 Connector Button + Floating Dialog (BMA Template) -->
3333
<div style="display:flex;justify-content:center;align-items:center;width:100%;padding:2rem 0;">

modules/library/servlets/servlet/src/main/webapp/search.jsp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@
99
<body>
1010
<nav class="nav"><div class="nav-inner"><span class="nav-brand">StanfordLibrary™</span><ul class="nav-links"><li><a href="index.jsp">Overview</a></li><li><a href="search.jsp" class="active">Search</a></li><li><a href="request.jsp">Request</a></li><li><a href="status.jsp">Status</a></li></ul></div></nav>
1111
<section class="hero" style="padding:4rem 2rem;"><div class="hero-inner"><span class="hero-tag">Catalog Search</span><h1>Search Library</h1></div></section>
12+
13+
<!-- CD1 Connector Button + Floating Dialog -->
14+
<div style="display:flex;justify-content:center;align-items:center;width:100%;padding:2rem 0;">
15+
<button id="cd1-btn" type="button" aria-pressed="false" style="all:unset;display:block;margin:0 auto;cursor:pointer;padding:0;border:none;background:transparent;transition:transform 0.3s cubic-bezier(0.42,-1.84,0.42,1.84),filter 0.3s ease;">
16+
<img src="images/black.button.png" alt="Connector" style="display:block;width:80px;height:80px;border-radius:50%;background:transparent;"/>
17+
</button>
18+
</div>
19+
<div id="cd1-overlay" style="display:none;position:fixed;inset:0;z-index:299;background:transparent;"></div>
20+
<div id="cd1-dialog" style="display:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:300;background:#1a1a1a;border:1px solid #333;border-radius:12px;padding:1.25rem;width:520px;max-width:90vw;box-shadow:0 8px 32px rgba(0,0,0,0.6);"><div style="font-size:0.9rem;font-weight:600;color:#e8e0d6;margin-bottom:0.75rem;">CD1 Connector &mdash; Port 49214</div><div style="display:flex;gap:0.5rem;margin-bottom:0.75rem;flex-wrap:wrap;align-items:center;"><select id="cd1-action" style="background:#222;color:#e8e0d6;border:1px solid #444;border-radius:8px;padding:0.45rem 2rem 0.45rem 0.75rem;font-size:0.8rem;cursor:pointer;appearance:none;"><option value="connect">Connect</option><option value="disconnect">Disconnect</option><option value="status">Status</option><option value="hardreset">Hard Reset Connection</option></select><button onclick="cd1Send()" style="background:#666;color:#fff;border:none;border-radius:8px;padding:0.45rem 1rem;font-size:0.8rem;font-weight:600;cursor:pointer;">Send</button><button onclick="cd1Ok()" style="background:#666;color:#fff;border:none;border-radius:8px;padding:0.45rem 1rem;font-size:0.8rem;font-weight:600;cursor:pointer;">OK</button></div><div style="display:flex;align-items:center;gap:0.5rem;margin-bottom:0.75rem;"><label style="display:flex;align-items:center;gap:0.4rem;color:#999;font-size:0.75rem;cursor:pointer;"><input type="checkbox" id="cd1-direct-port" style="accent-color:#888;width:14px;height:14px;cursor:pointer;"/>Direct Port (bypass Strernary&trade; 20000)</label><span id="cd1-mode-badge" style="font-size:0.65rem;background:#222;color:#aaa;padding:0.2rem 0.5rem;border-radius:4px;">STRERNARY</span></div><textarea id="cd1-textarea" placeholder="Connection idle..." spellcheck="false" style="width:100%;min-height:140px;background:#ffffff;color:#111;border:1px solid #333;border-radius:8px;padding:0.75rem;font-family:monospace;font-size:0.8rem;resize:vertical;"></textarea></div>
21+
<script>window.CD1_MODULE_PORT = "49214";</script>
22+
<script src="js/cd1-connector.js"></script>
1223
<section class="section"><div class="section-inner">
1324
<form method="GET" action="search.jsp" style="max-width:700px;margin:0 auto 2rem;"><div style="display:flex;gap:0.5rem;">
1425
<input type="text" name="q" placeholder="Search by title, author, subject..." value="<%= request.getParameter("q") != null ? request.getParameter("q").replace("\"","&quot;") : "" %>" style="flex:1;background:var(--bg-card);color:var(--text-primary);border:1px solid var(--border);border-radius:var(--radius);padding:0.6rem 0.75rem;font-size:0.875rem;"/>

modules/ncsu/servlets/servlet/src/main/webapp/index.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<p>Think and Do. The Wolfpack. 12 colleges, 37,000+ students. AI-assisted academic queries via Strernary™. Raleigh, North Carolina.</p>
4848
</div>
4949
</section>
50-
<div style="text-align:center;padding:0.5rem;font-size:0.7rem;color:<%= authorized ? \"#22c55e\" : \"#dc2626\" %>;"><%= authMsg %></div>
50+
<div style="text-align:center;padding:0.5rem;font-size:0.7rem;color:<%= authorized ? "#22c55e" : "#dc2626" %>;"><%= authMsg %></div>
5151

5252

5353
<!-- CD1 Connector Button -->

modules/unc/servlets/servlet/src/main/webapp/index.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<p>Lux Libertas. The Tar Heels. America's first public university (1789). 14 schools, 30,000+ students. AI-assisted academic queries via Strernary™. Chapel Hill, North Carolina.</p>
4848
</div>
4949
</section>
50-
<div style="text-align:center;padding:0.5rem;font-size:0.7rem;color:<%= authorized ? \"#22c55e\" : \"#dc2626\" %>;"><%= authMsg %></div>
50+
<div style="text-align:center;padding:0.5rem;font-size:0.7rem;color:<%= authorized ? "#22c55e" : "#dc2626" %>;"><%= authMsg %></div>
5151

5252

5353
<!-- CD1 Connector Button -->

modules/uncw/servlets/servlet/src/main/webapp/index.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
<p>University of North Carolina Wilmington — Computer Science Club & College Community. Universal, fun. SeaCoast colors. File sharing, messaging, audio playback, chancellor notes. Go Seahawks! 🌊</p>
9292
</div>
9393
</section>
94-
<div style="text-align:center;padding:0.5rem;font-size:0.7rem;color:<%= authorized ? \"#22c55e\" : \"#dc2626\" %>;"><%= authMsg %></div>
94+
<div style="text-align:center;padding:0.5rem;font-size:0.7rem;color:<%= authorized ? "#22c55e" : "#dc2626" %>;"><%= authMsg %></div>
9595

9696

9797
<!-- CD1 Connector Button -->

out/Main.class

209 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)